Hi,

The problem is you're defining a method on loc>>, and the method body
does not get optimized. As a result any word calling loc>> doesn't get
optimized either and this causes problems.

My plan is to make all words optimized eventually and get rid of the
distinction. For now, make sure that code in method bodies on existing
generic words has a stack effect (you can use 'infer' to check).

Slava

On Tue, Feb 3, 2009 at 11:14 PM, Steve Weeks <[email protected]> wrote:
> Not sure what I'm doing wrong, but the following code makes factor go
> a little nuts.
>
> IN: sample
>
> USING: accessors models ;
>
> TUPLE: loc-model < model ;
> : <loc-model> ( loc -- model ) loc-model new-model ;
> M: loc-model (>>loc) set-model ;
> M: loc-model  loc>> value>> ;
>
>
> I get 1900 semantic warnings and weird things happen like the help
> system gets alien-invoke-error instance errors.  Other weird things
> too,  I'll probably change my code and not try to wrap a model in code
> that makes it look like a loc.  It is probably too cleaver any way.
>
> ------------------------------------------------------------------------------
> Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
> software. With Adobe AIR, Ajax developers can use existing skills and code to
> build responsive, highly engaging applications that combine the power of local
> resources and data with the reach of the web. Download the Adobe AIR SDK and
> Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to