View Source question

Neil Graham lerc at screamingduck.com
Fri May 16 19:59:49 EDT 2008


On Saturday 17 May 2008 11:27:29 am Robert Myers wrote:
> 'View Source' is touted as one of the user win features of the XO. There
> doesn't seem to be much useful discussion of it on the wiki.
>
> What's the best path for making an activity 'view source' friendly?
> Reverse engineering from Chat, which is? Some other way?
>
> Chat is monolithic. Is there a way to make a multi-file activity 'view
> source' aware? Or does one have to roll the activity into a single file?

View source is a nice idea, but I hardly see how it could be practical.  You 
could implement it at a level of having a key combination to open the current 
activity in develop.  You wouldn't want a single key for that since it's a 
significant operation that you don't want to launch by mistake.

At any other level it would be nigh on impossible to implement it 
meaningfully.  You treat it as a sort of breakpoint event which opens up a 
simple text view of the current .py file being executed at that moment, but 
code flows all over the place when it's active and when it's not you just end 
up at a message loop.

What a user would want is for the view to open up on code that is semantically 
relevant to what the XO is doing in relation to the user, that is a tough nut 
to crack from an automatic perspective.





More information about the Devel mailing list