Thanks for trying this out. The syntax I had was "put the short name of
control ID 1" and it works 99.9% of the time (assuming there is a control id
1), just not in this one circumstance that I haven't been able to track down so
I'm not sure what the difference is between what you tried and wha
On 3/27/11 2:27 PM, Peter Haworth wrote:
- When is the defaultStack property taken into account when
referencing a control?
It should be as you expected. The control's reference should be
evaluated in terms of the defaultstack.
However... I just tried your original script statement and it fa
I've made the changes necessary to use long IDs in my application as suggested
by Scott. For my own eduction though, I'd like to understand how the
defaultStack property is used.
As a refresher, the following statement is being rejected with an error that it
can't find the control:
"put the s
Thanks for the explanation Scott. I don't think this had anything to do with
the original problem I had but I have to admit I was under the impression that
control IDs were unique within a stack file, not within each (sub)stack within
a stack file.
Pete Haworth
On Mar 25, 2011, at 4:30 PM, Sco
A stack file and a stack are not the same thing.
There could be duplicate short id's, but not duplicate long id's.
You need to be careful about making copies of stacks using 'Save As'
and then defining them as substacks of the same main stack. This is a
legal process, but LC does not scan o
Peter:
The expression "same stack" is key here. Substacks of a main stack are not
the same stack. This is easy to test: create a new stack, add some
substacks to it. If you drag a button into each of the substacks, the ID of
each button should be 1004, and control ID numbering will start from
While looking into this further, I have discovered what I think is another
anomaly. I have two substacks of the same main stack with one card in each
one. Each card has one group on it - the two groups have the same short ID.
The dictionary says that IDs "are guaranteed to be unique within
Thanks. Yes, the long ID would be best - I wrote this code not long after
starting to use LC and before I understood all the ramifications of IDs,
layers, etc! I guess I'll go back and change all the calls to the function to
pass the long ID instead of the short one.
I'm still somewhat puzzle
Yes, setting the defaultStack to the name of the substack *should* work.
You may want to check that you're not inadvertently setting focus back to
the main stack somewhere in your scripts.
Unless you're constantly changing stack names for some reason, IMO, you're
better off using the long ID of th
Thanks Scott, that's a possibility, the stack in question is not the
"front-most" one for sure. However, shouldn't the defaultStack property (which
is set to the correct substack) taken care of that? Or is there some other
property I can use to qualify the ID? Since this is a general purpose
I can't refer to it as a button because this is a general purpose function that
has to deal with any type of control, not just a button. But I did try doing
that in the message box and got the same error.
It's been working fine for months and fails just on this one button so yes,
there's def
The only thing I could guess is your substack is not the top stack. I don't
believe LC has ever known to automatically look in substacks for the
existence of controls. LC can have multiple stacks open simultaneously, and
can have controls of the same ID in different stacks, so unless the stack
wi
Hmmm... not sure but this works fine for me.
on mouseUp pMouseBtnNo
breakpoint
put the id of me into theID
put the short name of control id theID
end mouseUp
I get the short name of the button in the message box. Seems like something
else is not compiling there.
Bob
On Mar 25, 2
Hmmm... is it a button? Try referring to it as a button instead of a control.
Bob
On Mar 25, 2011, at 12:46 PM, Peter Haworth wrote:
> I have a function that returns information about a control which takes the
> control's short ID as a parameter. This has been working fine for a long time
>
I have a function that returns information about a control which takes the
control's short ID as a parameter. This has been working fine for a long time
but has suddenly started to throw a run time error for one specific control.
The statement "put the short name of control ID pid into myControl
15 matches
Mail list logo