$sendall again

Bo Carleö mail at corbisoft.com
Fri May 30 09:06:21 EDT 2008

Thanks Geir for clarifying this issue.

I should have mentioned that (as you thought) that tWind
is a task object var.

I should have thought of placing $ref right, as I have it correct
when calling the main tWind method. Silly...

Well, now it's working.

Next step is to construct a container field resize procedure for
O7 as I don't have a $sendall command there.
I will have to build a field list using $makelist and then step  
through it.
Hopefully I'll get $ref right there...


30 maj 2008 kl. 11.11 skrev Geir Fjærli:
> Hi Bo.
> The issue is that $ref.tWind.$Size does not make sense. $ref is a  
> reference
> to an object in your scrollbox. $sendall either assigns a value to  
> or calls
> a method in the element starting with $ref. But tWind is not an  
> object or
> property of the object that $ref points to, but rather an independent
> instance somewhere, so $ref.tWind is wrong.
> Now think what you would do if you were not using a $sendall. Then  
> you would
> probably say something like this
> For each object in the scrollbox
>  Do tWind.$Size(objectref)
> End for
> Notice that the reference is sent as a parameter to $Size, which  
> then has a
> parameter var (Object) set up to receive it. This does not change  
> even if
> you are using a $sendall, $Size still expects the item reference to be
> passed in as a parameter, so that is what you need to do.
> You don't say what tWind is, a task object var maybe. But assuming  
> it is in
> scope from the method you are executing, try this:
> Do targetObject.$objs.$sendall(tWind.$Size($ref)) Returns #1
> This way, for each of the objects in the scroll box, tWind.$Size is  
> called
> passing the reference to that object as a parameter.
> Geir :)
> -----Original Message-----
> From: omnisdev-en-bounces at lists.omnis-dev.com
> [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Bo  
> Carleö
> Sent: 30. mai 2008 01:48
> To: OmnisDev List - English
> Subject: Re: $sendall again
> Thanks to all who have responded.
> Still I can't get it to work.
> This is part of the code:
> Main merthod is tWind.$Resize
> targetObject is an item reference parameter.
> If $topwind.$class().$objs.[targetObject.$ident].$objtype=kScrollbox
>    OK message  {Table   [targetObject.$name()]}      -      returns
> the right table name
>    Do targetObject.$objs.$sendall($ref.tWind.$Size) Returns #1
>    OK message  {[#1]      -       returns 47 which is correct
> End If
> Called method is tWind.$Size
> parameter Object  -  item reference
> Calculate Object.$width as Object.$width*1,25
> Calculate Object.$height as Object.$height*1,25
> Calculate Object.$left as Object.$left*1,25
> Calculate Object.$top as Object.$top*1,25
> Calculate Object.$fontsize as Object.$fontsize+1
> tWind.$Size is never called. (Checked with OK messages)
> I've also tried Do targetObject.$objs.$sendall($ref.tWind.$Size())
> No difference.
> Evidently the fault is in the calling line. Can't figure what is  
> wrong.
> Bo
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list