Thursday, December 14, 2017

#1 2016-08-29 02:44:07 pm

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

How can I lazy load with ASOC

Hi there

Is there a possibility to lazy init a property? E.g. load another object?

Offline

 

#2 2016-08-29 03:35:44 pm

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Re: How can I lazy load with ASOC

Untested (not at home) but this might work:

Applescript:


Property test: _test

On test ()
If _test is not missing value then return _test
-- do stuff to initiate test
End

Offline

 

#3 2016-08-29 03:57:53 pm

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Re: How can I lazy load with ASOC

Ah. No.

I got it:

Applescript:


Property _test: missing value

on test ()
If _test ist not missing value then return _test
-- do stuff
Return _test
End

Last edited by Jonathan Engelhardt (2016-08-29 03:58:19 pm)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)