visibility

Is there a way to call a private Class method from an instance in Ruby?

Other than self.class.send :method, args..., of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code. ...

How can I check if one game object can see another?

I have an object, that is facing a particular direction with (for instance) a 45 degree field of view, and a limit view range. I have done all the initial checks (Quadtree node, and distance), but now I need to check if a particular object is within that view cone, (In this case to decide only to follow that object if we can see it). A...

Using internal in package gives error

I'm trying to place a class into a package where another public class is placed. The documentation says that only one external visible declaration can be put in a package. So i declare the second class internal. But then it gives the following error: 5006: An ActionScript file can not have more than one externally visible definition...

Java Private Field Visibility

So I was making a class the other day and used Eclipse's method to create the equals method when I realized that it generated the following working code: class Test { private int privateInt; [...] public boolean equals(Object obj) { [...] Test t = (Test) obj; if ( t.privateInt == privateInt ) { [...] } } t.priv...

Java Protected Access Not Working

In java, there's three levels of access: Public - Open to the world Private - Open only to the class Protected - Open only to the class and its subclasses (inheritance). So why does the java compiler allow this to happen? TestBlah.java: public class TestBlah { public static void main(String[] args) { Blah a = new Blah...

Visibility of script includes in an IFRAME

For example: script.js: function functionFromScriptJS() { alert('inside functionFromScriptJS'); } iframe.html: <html> <head> <script language="Javascript" src="script.js"></script> </head> <body> <iframe> <body> <script language="JavaScript"> functionFromScriptJS(); </script> </body> </iframe> </body> <h...

method visibility between classes in java

In Java (And in general) is there a way to make a class so public that it's methods etc... are accessible from little classes all around that don't even instantiate it? Ha, what I mean is... If I have a daddy class that has a method draw() and it instantiates a baby class called Hand and one called Deck, and then deck instantiates a babi...

Binding Visibility in XAML to a Visibility property

I've seen on the internet quite a few examples of binding a boolean to the Visibility property of a control in XAML. Most of the good examples use a BooleanToVisibiliy converter. I'd like to just set the Visible property on the control to bind to a System.Windows.Visibility property in the code-behind, but it doesn't seem to want to wo...

problem of conditional visibility and page breaks with rectangles in SSRS 2005

I am trying to insert a conditional page break, actually i had a report of 50 pages with invoices each invoice is 3 pages long so i need a paghebreak for the 2nd invoice t printon the next page as i need the whole report ot print back to back,so i inserted one page break,so this starts the next invoice to start on 4th page but i want nex...

changing Visibility to hosted winForms element in wpf application

Hi, I have ReportViewer winForms control for showing Microsoft Reports in my WPF application hosted over WindowsFormsIntegration. When the MouseDown event of my textBlock triggers, I would like it to fade lets say from 0 to 100 visability, like some other elements in my Window. It doesn't, so I was wondering is it the same for all hoste...

Does Interlocked provide visibility in all threads?

Suppose I have a variable "counter", and there are several threads accessing and setting the value of "counter" by using Interlocked, i.e.: int value = Interlocked.Increment(ref counter); and int value = Interlocked.Decrement(ref counter); Can I assume that, the change made by Interlocked will be visible in all threads? If not, w...

How do I invert BooleanToVisibilityConverter?

Hi, I'm using a BooleanToVisibilityConverter in WPF to bind the Visibility property of a control to a boolean. This works fine, but I'd like one of the controls to hide if the boolean is true, and show if it's false. Is this possible? Thanks, Andy ...

WPF: Hide Column using XAML

I'm trying to hide a column based a value I get from my object. Following is a bit of my playing around. Note: Binding="{Binding Path=SelectedShortName}" returns a value. I want to hide the column when that value is equal to something. I've tried a variety of ways, but it just seems like i'm butting my head. Any input appreciated. Ta ...

What is the best way to use links and anchors to toggle visibility in ASP.NET?

I have a page which is used to display numerous forms for the user to fill out and get reports generated. Each of these forms is inside it's own ASP:Panel control so that I can toggle the visibility of the form (so that only those with appropriate permissions get access to the reports they are allowed to). The client has now requested a...

Hide content in listbox item depending on a binding property in Silverlight

I have xaml that lookes like this <ListBox> <ListBox.ItemTemplate> <DataTemplate> <StackPanel> <TextBlock Text="{Binding Name}" /> <StackPanel Orientation="Vertical" x:Name="contentPanel" > Content goes here... </StackPanel> </StackPanel> </DataTemplate> </ListBox.ItemTemplate> The listbox binds to an object with a...

How to check if an element is really visible with javascript.

In javascript, how would you check if an object is actually visible. I don't just mean checking the visibility and display attributes. I mean, checking that the element is not visibility:hidden or display:none underneath another element scrolled off the edge of the screen. EDIT: For technical reasons, I can't include any scripts. I ...

toggle div visibility with a checkbox list

Hi, I have a web application(ASP.NET2.0 C#). Within it, I have a div that contains a checkbox list and a button. I want to toggle the div viewing, so I got some javascript code online to help me. Heres the code: <script language="javascript"> var state = 'hidden'; function showhide(layer_ref) { if (state == 'visible') { ...

About private instance variables in Objective-C

In xCode 3, I defined private instance variables in a class. When I directly access the private variables in the client codes, why does the compiler just show me a warning, not an error? The code can still run. The warning says this maybe a hard error in the future. What does the "hard error" mean? Thanks. ...

[WPF] Testing the scrollbar visibility of a ListBox in code-behind

How to check whether the vertical scrollbar of the listbox is visible in code-behind? I have a listbox with x:Name="listOfItems" and its underlying ScrollViewer's VerticalScrollbarVisibility is set to auto. When the ItemsSource property of the ListBox is set, I want to check whether the verticalScrollbar is visible, but I don't know wh...

C#/.NET - WinForms - Instantiate a Form without showing it

I am changing the Visibility of a Form to false during the load event AND the form still shows itself. What is the right event to tie this.Visible = false; to? I'd like to instantiate the Form1 without showing it. using System; using System.Windows.Forms; namespace TestClient { public partial class Form1 : Form { public...