PDA

View Full Version : Reference an object in a custom VFP section



hmischel@diligentsystems.com
2015-12-04, 10:16
Hi,

I am having a brain freeze. I know I did this a while back, but I can't recall how to do this.

In a FoxPro Custom section, I have an image called myImage in a container that I would like to reference from a canvas section.
I know those items are not part of the LOM, but cant recall how to reference them in the app inspector.

Thanks (a slightly embarrassed) Herb

HankFay
2015-12-04, 10:29
Hi Herb,

so this is a different section?

I believe it would be:

loCustSection = lianja.get("mycustsect")
loImage = loCustSect.mycontainer.myimage

If the above works, but doesn't work when all put together (loImage = lianja.get("mycustsect")..mycontainer.myimage), Barry says to file a bug report, because it should.

IOW, it's more like VFP after you get the object reference to the custom section.

And this could be entirely wrong. <s>

Hank

hmischel@diligentsystems.com
2015-12-04, 11:22
Hi Hank,

I tried every combination I could recall. Somehow I think I need to include the namespace.
I will open a ticket.

Thanks.

Herb

hmischel@diligentsystems.com
2015-12-04, 12:16
Yvonne - thanks!

I had forgotten that I needed to declare the object public.

That works!

pauln
2015-12-05, 00:38
Hi Herb - can you share the code answer, thanks.

hmischel@diligentsystems.com
2015-12-05, 23:33
HI Paul - This is old post that Yvonne found.
http://www.lianja.com/community/showthread.php?2563-Controlling-access-to-command-buttons-in-Canvas-page&p=11775&viewfull=1#post11775