[Newbies] Re: new vs. initialize

2008-12-10 Thread Zulq Alam

Hi Greg,

My comments are below...

Greg A. Woods; Planix, Inc. wrote:

 Now I read on the WWW that the added sending of #initialize from
 Behaviournew was added in 3.9.

Where did you read this? I've been using Squeak for a few years and as 
far as I know the default implementation of #new has always sent 
#initialize.


The history of Behaviournew shows one version dated 23-8-2003. This is 
well before 3.9.


Just for fun I did a search for senders of #basicNew and I found quite a 
few which are from #new methods in classes which subclass directly from 
Object and which are in classes that also define their own #initialize 
method.  The curious bit is how some of these #new methods do send 
#initialize, but not all.  I'm guessing some that don't are for abstract 
classes, but is it true that all are?


There are a number of reasons one might call #basicNew, e.g. 
compatibility with other dialects, limiting use of #new by signalling an 
error, avoiding the normal initialisation from an alternative 
constructor, etc. In most cases super new would also work.


Those that call intitialize may do so because they still need that 
method to be called, perhaps after doing something else. Some call it 
for compatability...




Also, doesn't this still create an _enormous_ portability problem with 
other Smalltalks?




Have a look at what Seaside and other cross dialect projects do. I 
believe but am not sure they all have some sort of self basicNew 
initialize on all their top level classes.


- Zulq
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] A browser for the WordNet lexical db in Smalltalk, anybody?

2008-12-10 Thread Klaus D. Witzel

Hi list,

has anyone started with/plans for a browser for a WordNet lexical db in
Smalltalk? I checked their Prolog formatted files,

- http://wordnet.princeton.edu/obtain

actually read them into a Squeak .image; they need only a handful of
memory MB (7.5, strings as yet not symbolized) plus less than 10MB of disk
space if gloss texts would be stored in the .changes file.

Also, if anyone already has (or had) ideas for a GUI for a WordNet browser
in Squeak please let me know (!) I cannot say I like their basic Web
interface (it has nothing that a Smalltalk browser offers)

-
http://wordnet.princeton.edu/perl/webwn?o0=1o1=1r=1s=small+talki=1h=100#c

and think that can be done better for local use, for example in class
rooms (and of course when authoring documentation for Squeak ;) but,
unlikely for the OLPC because of the footprint.

Thanks in advance for your feedback.

/Klaus

--
If at first, the idea is not absurd, then there is no hope for it.
Albert Einstein

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] what's a model?

2008-12-10 Thread Aidan Gauland

Hello,

 I've been poking around on the web for information on how to build GUIs 
using Morphic's widget-like morphs, and I've found some helpful stuff, but a 
term that I see used a lot in this context is model, which I still can't 
figure out.


So my question is: What's a model in Squeak?  How do I use them with Morphs?

Thanks,
Aidan
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] what's a model?

2008-12-10 Thread tjohnson
Aidan,

A model is the logic of your program.  Generally, it is the abstract concept 
that your UI 
attempts to present to the user.  For example, if you are creating a personal 
finance 
program, your model might consist of objects like BankAccount and Transaction, 
whereas 
your UI might consist of BankAccountView and TransactionView.

Model is one third of the time-tested concept of Model-View-Controller, which 
is a 
pattern for creating programs with user interfaces.  If you search for MVC on 
the web, you 
should find some pretty useful information.  Generally the theory behind MVC is 
that your 
application's logic (or model) should be separate from its interface / 
presentation (view).  The 
controller would be some glue which mediates between the model and the view, 
but often 
the controller is sort of melded into the view these days.

Squeak does include a class called Model, which is abstract and not much used 
these days.  
Best not be distracted by it.

Hope that helps!  Have you looked at some of the great Morphic tutorials on the 
web?  I 
found the chapter in Squeak By Example very informative.

- TimJ

- Original Message -
From: Aidan Gauland [EMAIL PROTECTED]
Date: Wednesday, December 10, 2008 9:55 pm
Subject: [Newbies] what's a model?
To: beginners@lists.squeakfoundation.org

 Hello,
 
  I've been poking around on the web for information on how to 
 build GUIs 
 using Morphic's widget-like morphs, and I've found some helpful 
 stuff, but a 
 term that I see used a lot in this context is model, which I 
 still can't 
 figure out.
 
 So my question is: What's a model in Squeak?  How do I use them 
 with Morphs?
 
 Thanks,
 Aidan
 ___
 Beginners mailing list
 Beginners@lists.squeakfoundation.org
 http://lists.squeakfoundation.org/mailman/listinfo/beginners
 
 
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Re: [Newbies] what's a model?

2008-12-10 Thread Aidan Gauland
Oh yes, I've read Squeak By Example and played around with Morphic a bit 
(although haven't created anything useful with it), I just need to figure out 
how to write a class that I can use as a model with Morphs such as 
PluggableListMorph.


[EMAIL PROTECTED] wrote:

Aidan,

A model is the logic of your program.  Generally, it is the abstract concept that your UI 
attempts to present to the user.  For example, if you are creating a personal finance 
program, your model might consist of objects like BankAccount and Transaction, whereas 
your UI might consist of BankAccountView and TransactionView.


Model is one third of the time-tested concept of Model-View-Controller, which is a 
pattern for creating programs with user interfaces.  If you search for MVC on the web, you 
should find some pretty useful information.  Generally the theory behind MVC is that your 
application's logic (or model) should be separate from its interface / presentation (view).  The 
controller would be some glue which mediates between the model and the view, but often 
the controller is sort of melded into the view these days.


Squeak does include a class called Model, which is abstract and not much used these days.  
Best not be distracted by it.


Hope that helps!  Have you looked at some of the great Morphic tutorials on the web?  I 
found the chapter in Squeak By Example very informative.

___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners