[Newbies] Re: Global string search and replace in an image

2012-09-11 Thread Andy Burnett
Thanks everyone, that has given me some great ideas. I think refactoring is
clearly the way to go, and - at least - I now know how to search for the
terms in the source code.

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


[Newbies] Re: Global string search and replace in an image

2012-09-11 Thread Andy Burnett
I thought Andy was talking about source code.
>
> Personally, if I have to rename a method, I search for all senders and fix
> them with copy&paste. Same for class renames, inst var renames, etc. There
> just are not that many occurrences, so fixing each one individually is
> quick, plus I get to verify that the change is indeed what I wanted.
>
> There is a tool to automate a lot of this called the Refactoring Browser,
> which many developers like, but I don't even have it in my image.
>

Thanks very much to both of you.

Bert, you are quite right, I was talking about changing strings in source
code - sorry, I should have made that clear.

The problem is that we I am dealing with an image where a number of strings
have been hard coded into various methods. What I was looking for was a
global - source code - search and replace.  Does that exist?  Or, is it
possible to FileOut the entire source tree, do a search and replace
externally, and then file it in again. I have tried this in the past, but
the image never seems to work properly afterwards.

Clearly, the correct way to solve the problem is to abstract the hard coded
text into another object - or maybe a global variable? Perhaps I will just
have to bite the bullet.  This would make it far easier for
internationalisation etc.  Actually, are there any packages to help with
internationalisation?

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


[Newbies] Global string search and replace in an image

2012-09-10 Thread Andy Burnett
Hello,

Is there a method - or other mechanism - that would let me find all
instances of 'foo' and replace them with 'bar' within an image? I imagine
there must be, but I can't find it.

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


Re: [Newbies] Using SAX to get the contents of a node

2011-04-19 Thread Andy Burnett
hernan.morales said

<<
Write a method

YourSAXParser>>characters: aString

to access the contents of the current node in aString. YourSAXParser
should be a subclass of SAXHandler.
>>

Thanks Hernan, I now have a working system.

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


Re: [Newbies] Using SAX to get the contents of a node

2011-04-18 Thread Andy Burnett
<< David Corking said..

> I am trying to use the SAXHandler (Pharo 1.2.1) to parse a delicious rss
> feed.  I want to get the contents of a tag

I hope a guess does less harm than good. This example looks relevant:

http://wiki.squeak.org:8080/squeak/505

unless the Pharo version of the code has changed greatly from the
version used by the wiki writers.>>

Thanks David, that is a really useful resource.

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


[Newbies] Using SAX to get the contents of a node

2011-04-15 Thread Andy Burnett
I am trying to use the SAXHandler (Pharo 1.2.1) to parse a delicious rss
feed.  I want to get the contents of a tag, i.e. the text that lies between
the opening tag and the closing tag.

Thanks to Laurent's excellent video I understand how to access the
attributes (using startElement:attributes:), but I can't work out how to get
the intra-tag text.  I am sure it is a simple call, but could someone point
me in the right direction?

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


[Newbies] UDP Multicasting

2010-12-31 Thread Andy Burnett
Is it possible to do UDP multicasting with Squeak?

If so, does anyone have a small example?

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


[Newbies] What is the difference between Pharo 1.0 & Squeak 4.1?

2010-06-21 Thread Andy Burnett
Could someone please explain - in simple/practical terms - the key
differences between Pharo and Squeak. Or, if it makes more sense, the
reasons why I might choose one over the other, i.e. Pharo is better for 
whereas you might use Squeak for .

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


[Newbies] Re: Beginners Digest, Vol 50, Issue 5

2010-06-09 Thread Andy Burnett
Hernán wrote
<<<
Hi Andy,

You may try http://www.squeaksource.com/SimpleTextParser.html which is
a fork of the Avi's CSV parser I did to support additional protocol.
If you like fix or include some features, I can add you as project
developer. You may specify what's your particular case/issue with the
parser so other people can help you.
>>>

Thanks Hernán
That's great. I will switch over to using your package immediately.
 However, I am still not clear how one submits bug fixes and enhancements to
Squeak packages.

One of the questions that Randal asks on his FLOSS show is "how can people
contribute to the projects", and usually there is some sort of process.  At
a very simple level, I would like to understand the mechanics of how I can
help to improve packages.  Now, it might be as simple as emailing the
package owner and saying "hey, I found a bug, and this is how I fixed it"
and leaving it at that, but there may be a more sophisticated way of doing
it via monticello etc.  Ideally, I would like to avoid creating forks,
because - on my experience - it makes it harder for people to find things.
 For example, I searched for CSV, but didn't find your package.

I wonder if it would be possible to create a 'star' rating system, a bit
like the reviews on Amazon, to help people find the packages that are highly
regarded?

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


[Newbies] What is the protocol for updating someone else's code?

2010-06-07 Thread Andy Burnett
I downloaded Avi Bryant's CSV Parser and found that it didn't work properly
with Pharo.  After a bit of digging around I managed to fix it. Now I am a
bit stuck. I would like to submit it back to Squeaksource, but I don't
really know what the protocol is.  Should I:

   1. Put it back in the same monticello repository - would I have write
   access by default? - as an update
   2. Do I create my own repo, in which case how do I tell other people
   where to find it - I really want to avoid creating yet more packages for
   people to search through.
   3. Do I email Avi and give him the update
   4. Some other option

I think the problem is slightly more complicated because I am using Pharo
1.1. I don't know whether my fixes are necessary for Squeak, or Pharo 1.0.

What is the recommended approach?

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


[Newbies] Re: Is there a reason why this RadioButton group doesn't ever call the callback?

2010-04-28 Thread Andy Burnett
John McKeon wrote

<<<

You probably don't want that if you have other inputs on the form anyway.
You really should be posting this to the Seaside list as well. You would
probably have your answer by now.

John

>>>

Thanks John, I will move it over to that list now. My assumption was that it
was a very basic mistake on my part. However, it seems as though it may be
more complicated than that.

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


[Newbies] Re: Is there a reason why this RadioButton group doesn't ever call the callback?

2010-04-27 Thread Andy Burnett
John McKeon wrote:

<<<
Hey Andy
I have a radio group defined like this (using your code):

renderContentOn:html
| group |
html form:
[
html radioGroup [ :rg |
rg radioButton
submitOnClick;
selected: self contact isMale;
callback: [self halt];
with: [html text:'male'].
rg radioButton...etc
]
Hope that helps
John
>>>

Thanks John,
That does fix part of the problem. Initially the radio buttons weren't
actually in concert - the code in the Seaside book wasn't producing
'name="something"' code.  I wonder whether that code would ever work?

Anyway, unfortunately, the callbacks are still not working. It is very odd.
 The form renders properly, it is just that the callbacks never fire.  The
code below shows two version - radio button and select statement. The select
version works perfectly.  I would be really interested to know how to go
about debugging this.

renderContentOn:html

html form:
[
html radioGroup: [ :rg |
rg radioButton
selected: self contact isMale;
callback: [self contact beMale];
with: [html text:'male'].
rg radioButton
selected: self contact isFemale;
callback: [self contact beFemale];
with: [html text:'female'].

].
html select
list: #(#Male #Female);
selected: self contact gender;
callback: [:value| (value=#Male) ifTrue:[self contact beMale] ifFalse:[self
contact beFemale]].
html submitButton on: #save of:self.
]

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


[Newbies] Is there a reason why this RadioButton group doesn't ever call the callback?

2010-04-27 Thread Andy Burnett
Hello

I am sure I am missing something very obvious - hence the posting on the
beginners' list.

I am working through the seaside book, and everything has been fine, until I
tried to replace my select item with a radio group. The form renders
correctly, but never fires the callbacks.  Could someone poke me with a clue
stick?  By the way, the self halts are in there because when I put the halt
commands in the beMale beFemale methods, they never fired either. So I was
working my way back up the chain.

The strange thing is that the other text input boxes (removed in this
snippet) updated the model correctly.

renderContentOn:html
| group |
html form:
[
group := html radioGroup.
html text:'male'.
html radioButton
group: group;
selected: self contact isMale;
callback: [self halt].
html text: 'female'.
html radioButton
group: group;
selected: self contact isFemale;
callback: [self halt].
html submitButton on: #save of:self.
]

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


[Newbies] Re: Making squeak hang

2010-03-18 Thread Andy Burnett
Forget it. I was so focused on doing things with the TextMorph, I completely
forgot to call super initialize.

Cheers
Andy

On Thu, Mar 18, 2010 at 16:02, Andy Burnett  wrote:

> Is there something fundamentally wrong with what I am doing, or is this a
> bug?
>
> 1. Set up a new category 'AB-Test'
>
> 2. Subclass RectangleMorph, and add an instance variable 'textReporter'
>
> RectangleMorph subclass: #AbRectangleMorph
> instanceVariableNames: 'textReporterThing'
> classVariableNames: ''
>  poolDictionaries: ''
> category: 'AB-Test'
>
> 3. Create an initialization method in the new class...
>
> initialize
> textReporterThing := TextMorph new.
> textReporterThing := self bounds asString.
>
> 4. Create a new instance and openInWorld
>
> Everything stops responding! I can still close without saving - from the
> menu - but all UI stuff stops.  Pressing Apple . doesn't produce a break.
>
> System is OSX 10.6
> PharoCore1.0rc1
> Latest update: #10505
>
>
> Cheers
> Andy
>
>
>
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Making squeak hang

2010-03-18 Thread Andy Burnett
Is there something fundamentally wrong with what I am doing, or is this a
bug?

1. Set up a new category 'AB-Test'

2. Subclass RectangleMorph, and add an instance variable 'textReporter'

RectangleMorph subclass: #AbRectangleMorph
instanceVariableNames: 'textReporterThing'
classVariableNames: ''
poolDictionaries: ''
category: 'AB-Test'

3. Create an initialization method in the new class...

initialize
textReporterThing := TextMorph new.
textReporterThing := self bounds asString.

4. Create a new instance and openInWorld

Everything stops responding! I can still close without saving - from the
menu - but all UI stuff stops.  Pressing Apple . doesn't produce a break.

System is OSX 10.6
PharoCore1.0rc1
Latest update: #10505


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


Re: [Newbies] Can a block be a string?

2010-02-19 Thread Andy Burnett
Thanks guys

I just wanted to make sure I hadn't completely misunderstood blocks!

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


[Newbies] Can a block be a string?

2010-02-18 Thread Andy Burnett
I am playing around with Seaside 3 and noticed that, for example:

html paragraph: 'text', and
html paragraph: [html text: 'hello'].

Are both valid.

When I looked at the definition for paragraph:  it says that takes a aBlock,
but then doesn't seem to do a value: aBlock.  So, what I am wondering is
whether it is valid to give a string as a block, or whether this is just a
slightly loose definition of block?

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


[Newbies] Re: Defining a binary message selector

2009-11-16 Thread Andy Burnett
Michael said <<

If you want to implement the method as a binary message (with special
characters), everything is fine

>>

Brilliant, so I was on the right track - sort of!  Now for the important
question.  Where are the special characters defined?  I looked in Smalltalk,
and found a SpecialObjectsArray  (along with a warning saying "don't touch
this"!).  I am not planning to touch it, but I am curious to understand how
the system works.

<<
The argument to a binary message is not undeclared; the simple fact
that the message is binary *implies* there will be a parameter.

Am I making sense?

>>

Totally, that clears it up for me.

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


[Newbies] Re: Defining a binary message selector

2009-11-15 Thread Andy Burnett
Michael said <<

Hi Andy,

why would the message have to be binary anyway? If you want the k-th
Fibonacci number, why don't you just send #fib to k?

Regarding symbols vs. not symbols: all selectors are symbols,
internally. I might get something in your e-mail wrong - could you
restate the question?

>>

Hi Michael
Thanks very much for your thoughts. Let me try to explain myself, slightly
more clearly!

First, this was just an experiment. I was reading a book on Python, saw how
they did it, and thought I would try in Squeak. So, I hadn't really thought
about how I was going to use it.  I like your suggestion about implementing
is as:  anInteger #fib.  However, thinking about implementing it as a binary
message made me curious about why I couldn't do that.

The specific problem I am having is:
If I define an Integer method such as

<<<*** aNumber

Squeak is quite happy to let me create it.  However, if I do something
likefib aNumber, the compiler complains that aNumber is a unknown
variable, which I need to define.  So, what I was really trying to
understand was what it was about the e.g. <<< symbol which allowed it to
have an undeclared argument.

I think that, based on your last message, it is just that <<< etc have been
defined as special characters. Is that correct?

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


[Newbies] Defining a binary message selector

2009-11-15 Thread Andy Burnett
As an experiment, I tried to create a Fibonacci method for Integer.
Initially, I defined it as Integer>>fibonacci: aNumber. However, having
thought about it a bit more I realised that it should probably be a binary
message like '+'. I tried to create it as such, but Squeak wouldn't let me -
even when I copied the code from the '+' method.

After a bit of head scratching, I decided that '+' was probably a symbol,
and that binary messages are probably limited to using symbols as selectors.
However, I once arrived late to a baseball game (never having seen it played
before), got confused about which team was which, and invented an entirely
new scoring system that pretty much explained the results on the
scoreboard.  So, I may be completely wrong about binary selectors!

If I am right about them requiring to be symbols.  Would it be a good idea
for meto make 'fibonacci' a symbol as well? Or would that lead to unintended
problems down the road?

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


Re: [Newbies] Building a remote count down clock

2009-11-08 Thread Andy Burnett
Hey Pascal

Thanks very much for your offer. I am going to work on the networking part
first - that seems trickiest - and then come back to the actual clock.  In
the meantime, I will download your clock and see what I can learn from you
regarding morphs.

Cheers
Andy

On Sat, Nov 7, 2009 at 06:34,  wrote:

>  Hi Andy,
>
> if I can help for the presentation part (not for the networking part), let
> me know. I've built an analog clock with some additional features (see
> www.squeaksource.com/AnalogClock). One feature is to show a specific
> duration (with start and stop time) as a morph embedded in the clock's dial.
> When the event has started I shrink its morph each minute. When stop time is
> reached the morph disappears. Right now this behavior is triggered by
> dropping an iCal-information on the clock.
>
> Kind regards,
> Pascal
>
>
> - Original Nachricht 
> Von: Andy Burnett 
> An:  Squeak list 
> Datum:   06.11.2009 00:11
> Betreff: [Newbies] Building a remote count down clock
>
> > Hello
> > I want to build a count down clock that will be used for presenters at an
> > upcoming conference.  The important point is that the clock needs to be
> > started and stopped by the 'admin' guy, but displayed on one or more
> > screens
> > for the speaker.
> >
> > My initial thought was to do it in seaside. However, I then wondered
> > whether
> > it would be better to build it all in Squeak.  The benefit of the Squeak
> > approach (I am guessing) is that I could somehow broadcast to the
> listening
> > images that I wanted them to start/stop, rather than have them polling
> > every
> > second. Obviously, the app is tiny, so in practical terms it doesn't
> matter
> > either way, but I am now curious about how I might communicate the
> > start/stop messages over the network to the images.  Is this relatively
> > easy
> > in Squeak?
> >
> > cheers
> > Andy
> >
> >
> > 
> >
> > ___
> > Beginners mailing list
> > Beginners@lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >
>
> Pascal Vollmer
> Email: pascal.voll...@ieee.org
>
> Jetzt NEU: Do it youself E-Cards bei Arcor.de!
> Stellen Sie Ihr eigenes Unikat zusammen und machen Sie dem Empfänger eine
> ganz persönliche Freude!
> E-Card Marke Eigenbau: HIER KLICKEN: http://www.arcor.de/rd/footer.ecard
>
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Building a remote countdown clock

2009-11-07 Thread Andy Burnett
Herbert said <<

no, you haven't. I used the code in a network with fixed IP's and no
DHCP running. Right here using NetNameResolver works just fine. If you
doIt:

(NetNameResolver addressForName: 'aComputersName') inspect

you should get an Inspector on a ByteArray with the IP address.
>>

Hmmm, I was expecting to get an inspector on a ByteArray, but what I
actually got was an inspector on SocketAddress. Something is obviously not
quite right here! :-)
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Building a remote countdown clock

2009-11-07 Thread Andy Burnett
David Corking said <<

>
> Andy,
>
> RFB (VNC) is quite popular in Squeak and may do what you want.
>
> I haven't used Nebraksa, but as far as I can tell it solves the
> distribution problem for you - if you want to build the UI in Morphic
> or MVC.
>
> http://wiki.squeak.org/squeak/1356
>
> According to this ticket Nebraska is broken in recent Etoys releases
> https://dev.laptop.org/ticket/7745 (I don't know about its state in
> mainstream Squeak images, so you may prefer to go to an older Squeak,
> or use Socket directly as Herbert suggested.)
>
> Hope that helps, David
>
> >>
>

Thanks David, I have never heard of the Nebraska system. It looks very
interesting. I will have a go with it.

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


[Newbies] Building a remote count down clock

2009-11-05 Thread Andy Burnett
Hello
I want to build a count down clock that will be used for presenters at an
upcoming conference.  The important point is that the clock needs to be
started and stopped by the 'admin' guy, but displayed on one or more screens
for the speaker.

My initial thought was to do it in seaside. However, I then wondered whether
it would be better to build it all in Squeak.  The benefit of the Squeak
approach (I am guessing) is that I could somehow broadcast to the listening
images that I wanted them to start/stop, rather than have them polling every
second. Obviously, the app is tiny, so in practical terms it doesn't matter
either way, but I am now curious about how I might communicate the
start/stop messages over the network to the images.  Is this relatively easy
in Squeak?

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


Re: [Newbies] Closure support

2009-10-30 Thread Andy Burnett
Randal said...

<>

Thanks for explaining the difference between blocks and closures. I think I
new understand that.  And, your example raised a new question for me.

What does the inner 'block' in [:n | [n]] actually do?

Out of curiosity I tried changing it to [:n | [n*10]], expecting the numbers
to be ten times bigger, but they were stil 1, 2, 3...  I also tried removing
the whole block, and b still evaluated to the same values.

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


[Newbies] Re: Beginners Digest, Vol 41, Issue 6

2009-09-13 Thread Andy Burnett
>I hope this helps: http://wiki.squeak.org/squeak/2168

>Giuseppe Luigi Punzi Ruiz
>Blog: http://www.lordzealon.com
>Twitter & Skype & GoogleTalk accounts: glpunzi

Hi Giuseppe
Thanks for the info. I have sent off the crash report to John

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


[Newbies] Recovering from a completely 'crashed' squeak image

2009-09-12 Thread Andy Burnett
I ran the Update Software option on a new Seaside 2.8.4 one click image.
After a long period of downloading and updating, I tried to save the image
but got a DNU message about mouse overs.  Anyway, in the end the image did
save, but now when I restart Squeak I get a message saying "Squeak VM quit
unexpectedly".

I am not particularly worried about recovering the contents of this specific
image - I had only been playing with it - but given that I am sure this will
happen again at some point in my development life cycle, I would like to
know the basic approach to recovering a usable image.  What would people
recommend.

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


[Newbies] Is HttpView2 still alive and working?

2009-04-27 Thread Andy Burnett
Hello

I want to build some simple web services for an application I am thinking
about.  The idea is that the client apps could be coded to run on the iPhone
or in Flash, so all I need on the back end is a simple storage and retrieval
system.  I stumbled across HV2 and it seems to be quite a neat system.
However, it hasn't been updated since 2007 (AFAICT) and it seems like things
in the Squeak world have a habit of never dieing. So, is it still alive, or
have things like Seaside meant that it is now redundant?

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


[Newbies] Re: Is there a VMware image of Squeak and Apache?

2009-03-17 Thread Andy Burnett
>
>
> From: Clayton Cottingham 
>
>
> check the vmware appliance repository
>
> if such a thing doesnt exist it wouldnt be too hard to put together
>
> the gemstone version would still require a 64bit machine to run on
>
> ive been working on making developer vmware images at work , not squeak
> related
>
> here is the digest version of the steps involved
>
>  download vmplayer or fusion if u are on a mac and install
>
> then go to http://www.easyvmx.com/  and make the starting vmware appliance
>
> from there just install your os of choice, {vmware allows you to use an
> iso as an cdrom}
>
> setup apache and squeak
>
>
>
>
Thanks Clayton, that's very helpful

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


[Newbies] Is there a VMware image of Squeak and Apache?

2009-03-15 Thread Andy Burnett
Following on from my question about SSL and Squeak  (thanks Lukas and Kyle
for your answers - very helpful).  I realised that what I really need is a
version of Apache which is configured to run with Squeak (or Gemstone), and
which already has all the 'bits' set so that I can concentrate on the
Smalltalk without having to worry about a totally different system - that I
know nothing about.

Does such a thing exist?  Or, would it actually be a dangerous/unhelpful
idea because Apache must always be configured differently for your specific
needs yada etc. etc.

Ideally, I would like the simplicity of a Squeak image, expanded to include
the whole web serving environment.

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


[Newbies] Are the arguments of a URL encrypted when you make an HTTPS connection?

2009-03-14 Thread Andy Burnett
I had a brilliant idea today! Instead of bothering with authentication, I
would use unguessable URLs (and/or arguments) for my application - yes I
know it is hardly unique, but it might solve a problem for me.

Anyway, after recovering form the shock of my idea, I suddenly realised it
would be completely useless if the URL is transmitted in plain text.  Does
anyone know when the encryption in an SSL session actually kicks in?  And is
there anything I can set on WAKom to ensure that the URL is protected?

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


[Newbies] What is the best way to generate HTML from an array of arrays

2008-10-13 Thread Andy Burnett
I want to display a threaded discussion. The threads will probably be stored
in an array, and n levels of comments would be in nested arrays, e.g.:

model := #('one' 'two' ('two a' 'two b') 'three').

I want to generated

OL
   LI  one  /LI
   LI  two  /LI
   OL
   LI  two a /LI
...
/OL


If there were no embedded arrays I would just do something like:

model do: [:each| html listItem: (each asString)]

But as soon as I have embedded arrays, my mind goes a bit blank and I start
thinking about recursive routines, and that doesn't seem very Smalltalk at
all!  So, what is the OO way to do this?

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


[Newbies] Re: Failing to install IRCe

2008-10-03 Thread Andy Burnett
<< Frank said...

I couldn't get Squeakmap to load IRCe, no errors just no action, but
when I downloaded the mcz file (Network-IRC-fc.10.7.6.mcz) and used
filelist to load it it came up fine.  I was able to get onto the IRC
channel with no problem.

 What is the 'package browser' you used to try and load IRCe? When do
you get the walkback, during loading or when u go to use it? IRCe
should run fine without the FFI package it only needs that for live
links.
>>


Thanks Frank, I tried loading the Network-IRC  - as you suggested - but,
unfortunately, I received exactly the same error message.  I have sent the
debug file to Edgar to see if he can work out what is happening.

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


[Newbies] Fwd: Does seaside have any built in methods to tell components about their models?

2008-10-02 Thread Andy Burnett

Oops, my finger slipped, and I hit send!

What I was trying to say is that this application will have several  
different components, eg navigator, title bar, area for the discussion  
threads etc. Each of these will need to know about the underlying  
model. Ideally, I would like to make the components reuseable, so I am  
looking for a good way to link them to the model.


My first thought was to simply add setModel: methods to each  
component, but then it ocurred to me that perhaps the framework has  
some sort of model propagation system, or a data bus that components  
subscribe to.


If not, is my simple approach the way others would do it, or is there  
a better way?


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


[Newbies] Does seaside have any built in methods to tell components about their models?

2008-10-02 Thread Andy Burnett

I am trying to build a simple, threaded, discussion system.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Failing to install IRCe

2008-10-02 Thread Andy Burnett
>> I thought I would try using the IRC channel, so I used the package
>> browser to install the package. Unfortunately, I get a walk back
>> window in which the system is complaining about "unable to find
>> function address" and gives error code 13.
>>
>> I am running OSX 10.5.4
>> Firefox 3.0.3
>> Squeak 3.8.18beta3U
>> Image: squeak3.10.2-7179-basic.image.
>>
>> The failed external call seems to be: "which firefox"
>>
>> Does anyone have any thoughts on how to fix this?
>>
>> Cheers
>> AB


>


Thanks Edgar
Unfortunately, I am still getting exactly the same error message. Does one
have to 'reboot' the squeak image after installing the FFI-Kernel?

Also, out of curiosity, why isn't this FFI package included in the standard
image? I am sure there is a good reason, I just wondered what it is.

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


[Newbies] Failing to install IRCe

2008-10-01 Thread Andy Burnett
I thought I would try using the IRC channel, so I used the package browser
to install the package. Unfortunately, I get a walk back window in which the
system is complaining about "unable to find function address" and gives
error code 13.

I am running OSX 10.5.4
Firefox 3.0.3
Squeak 3.8.18beta3U
Image: squeak3.10.2-7179-basic.image.

The failed external call seems to be: "which firefox"

Does anyone have any thoughts on how to fix this?

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


[Newbies] Should SUnit tests always have tearDown code?

2008-09-30 Thread Andy Burnett
I have discovered that my 'dead instances' were actually being created by
the TestRunner.  I was surprised about that, because, I had assumed, that
when I closed the TestRunner window, all the instances that I had created in
the setUp code, would be Garbage Collected.  Just to be clear my setUp code
was doing nothing more complicated than e.g.

fspace := Fspace new.

When I added tearDown routines to all the tests, e.g.

fspace := nil.

The problem went away.  Is this simply how the TestRunner works, or am I
doing something wrong?

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


[Newbies] Re: Removing 'dead' instances

2008-09-28 Thread Andy Burnett
<<< Randal said...
Setting "each" to "nil" there does nothing, since you aren't
updating the object that was originally in "each".
>>>

<< Marcus said...
This is a pretty common misconception. It seems to come up once a month. I
wonder why - mostly it's not people who are new to programming, who I would
expect to be unfamiliar with the distinction between an object or value and
the location it is stored in.>>

I was wondering exactly that myself. After my 'doh!' moment, when Randal
explained what I was doing wrong, I was trying to work out why I had made
the mistake. The conclusion I came to was that I was becoming so used to
sending messages to objects, that I had confused myself into thinking that I
was somehow sending 'become nil' to the object stored in :each.

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


[Newbies] Re: Are setters a good idea?

2008-09-28 Thread Andy Burnett
Thank you to everyone who responded.  It seems as though the summary view
is:
1. don't create setters unless you really need them, because it can make it
harder to see when values are changed
2. if one uses action verbs, they should truly reflect the physical or
logical action taking place.

All of which seems very reasonable to me :-)

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


[Newbies] Removing 'dead' instances

2008-09-28 Thread Andy Burnett
Could some kind soul please explain what I am doing wrong here?

I have a model, called Fspace, which I have created several instances of,
whilst I was testing it.

Fspace allInstances size reports 9 instances.

When I run

Fspace allInstancesDo:
   [:each |
   each := nil.
Transcript show: (each value); cr.
   Smalltalk garbageCollect]

The transcript shows that the values are set to nil. However, the instances
don't go away.  So, what am I doing wrong?

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


[Newbies] Are setters a good idea?

2008-09-27 Thread Andy Burnett
I read somewhere - can't remember where - that setters are considered evil.
The argument was that in the real world you can't suddenly change the colour
of a car, just by settings its colour value. Instead, you have to perform
some action, e.g. sprayPaintCar: aColour.  Therefore in the OO world, one
should tackle problems in the same way, i.e. if you want to change the value
of an instance variable, you have to call some sort of action method, that
makes sense in the context of the object.

Without wishing to send  startHolyWar to BeginnersList, do any of the
experienced developers work this way, or is it just a theoretical position?

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


[Newbies] Re: What do the symbols, next to methods, in the OmniBrowser system browser mean?

2008-09-21 Thread Andy Burnett
>


Brilliant! that's exactly what I was looking for. And, now that I know how
to edit the wiki (thanks Matthew) I will go and put a link in there.

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


[Newbies] Re: What do the symbols, next to methods, in the OmniBrowser

2008-09-19 Thread Andy Burnett
Thanks Dominic and Rob,

I would be happy to document it in the wiki once:
a) I have got myself an account and worked out where to put stuff
b) someone has confirmed or changed what I (and Rob) wrote about the symbols

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


[Newbies] What do the symbols, next to methods, in the OmniBrowser system browser mean?

2008-09-18 Thread Andy Burnett
I have only just started to use the OB based browser and I can't find much
in the way of documentation.  Looking through the methods, and their
hierarchy it seems as though the following applies:


   - Nothing: new method in this chain, i.e. the method could exist in other
   classes but not in this particular chain of inheritance.
   - Upward orange triangle: method is inherited and overridden in this
   class
   - Downward orange triangle: method is overridden in a subclass
   - Two orange triangles (up and down): overrides and is overridden in a
   subclass
   - Green up arrow: calls the same method in its super class
   - Blue triangle: Self should not implement or subClassResponsibility
   - Green plus: don't know, can't work this one out
   - Red flag: has a halt message in the code
   - Spanner: shows that the code needs to be returned to, i.e. under
   construction

So, is my understanding correct?  What does the green plus symbol mean,
and... is there anyway to get the browser to display all the methods an
object responds too, i.e. its fully inherited list?

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


[Newbies] Is Squeak Source now the preferred place to publish code?

2008-09-11 Thread Andy Burnett
When I was looking for a CSV parser, I checked Squeakmap, thinking it  
was the central repository. However, I subsequently learnt that Avi  
Bryant had published a very good parser at Squeak Source. Is that now  
the vest place to look for new code?


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


[Newbies] Re: What is the simplest way to create a collection from a text file in CSV format?

2008-09-10 Thread Andy Burnett
<>

Andy Burnett wrote:
> I have a small database containing questionnaire responses. The DB can
> output the responses (mainly descriptive paragraphs) in CSV format.
> Ideally, I would like to read each of the records into a collection of
> some kind.  I was hoping that there might be a 'fromCSV:' method, but I
> haven't found one.  One approach I had thought about was to edit the
> text so in order to create a series of array definitions, and then paste
> that into a workspace. However, that does lack a bit of elegance! So, is
> there a neat way of doing this?
>
> Cheers
> AB

That's great Zulq, much better than my rather procedural attempts.

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


[Newbies] What is the simplest way to create a collection from a text file in CSV format?

2008-09-09 Thread Andy Burnett
I have a small database containing questionnaire responses. The DB can
output the responses (mainly descriptive paragraphs) in CSV format.
Ideally, I would like to read each of the records into a collection of some
kind.  I was hoping that there might be a 'fromCSV:' method, but I haven't
found one.  One approach I had thought about was to edit the text so in
order to create a series of array definitions, and then paste that into a
workspace. However, that does lack a bit of elegance! So, is there a neat
way of doing this?

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


[Newbies] Re: Integrating Seaside and Flash

2008-09-06 Thread Andy Burnett
Ramon and Cédrick

Thanks to you both for your suggestions. I shall go and try some
experiments.

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


[Newbies] Integrating Seaside and Flash

2008-09-05 Thread Andy Burnett
I would like to include a Flash component in a seaside page. The component
needs to write data back to the seaside app.  I can think of two ways to
communicate with the server:
1. define a static URL, that the component can call, and somehow process the
returned data
2. have a form embedded on the page (that contains the flash component) and
get the component to write its data into the form, and then submit it

I was going towards the first option, but Ramon put a comment on my blog
that made me realise that I probably don't understand the seaside approach
yet. So, could anyone give me a simple example of what they feel is the best
approach?

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


[Newbies] The Bridge Playing example

2008-08-24 Thread Andy Burnett
<< Todd said:
A deck, hand, pile, all can be implemented as just an
OrderedCollection.  You might start with a Deal or BridgeRound or
something.  It might have some methods like:

initialize
   | hands deck |
   deck := Card bridgeDeck shuffled asOrderedCollection. "just like
english"
   north := OrderedCollection new.
   south := OrderedCollection new.
   east := OrderedCollection new.
   west := OrderedCollection new.
   trick := OrderedCollection new.


-- snip -- >>


Todd, thanks for writing that up. I found it really interesting to see how
you tackled the problem.  I think it would be great if - as time permits -
the experts of the list could take a problem - nice simple ones would be
good, and show how you might solve it.  It is also very interesting to see
how you refine/modify each others' solutions.

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


[Newbies] Re: How do experienced squeakers design applications

2008-08-20 Thread Andy Burnett
<<
I'm a squeak newbie but I work and design every day on ruby / python /
delphi projects.  Personnaly I sketched out on paper, using UML mainly. Then
I take the most quick and easy functionality/class collaboration to develop
and I develop using Test Driven Development ( read Dave Astels fantastic
book "Test Driven Development: A practical guide" if you want more details
on this. I like the idea that tests drive the design ).

A tool I like  to draw UML diagrams is umlet : http://www.umlet.com/  It's
fast, no popups, dialog boxes, saves it's diagrams in plain text files (easy
to version), ... and free as in free beer ;)

This done (100% test green, 100% coverage and most obvious use cases
tested), I sketched out again for next tasks and start all cycle again.

In professionnal environment I like to use Scrum iterative development
process.

I hope this help !


Laurent
>>

Thanks Laurent, that is very helpful, and I like the umlet application a
lot.

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


[Newbies] How do experienced squeakers design applications?

2008-08-19 Thread Andy Burnett
I have just started building the model classes for my first app. I  
sketched out, on paper, what I thought the objects should be, and then  
started coding. However, very quickly, I found that I was confusing  
the heck out of myself, trying to make all the parts work together.  
Clearly, I was not approaching the process the right way at all.


So, how do you guys build apps? Do you work out everything on paper  
first ( with UML diags etc). Or, do you use squeak as you design tool,  
creating stub classes as you realize you need them.


Also, do you try to get one class to pass all it's tests first, before  
you move on?


Basically, I am interested in the rules of thumb that you find helpful.

Thanks
Andy


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


[Newbies] How does one decide which Class to use as a model?

2008-08-18 Thread Andy Burnett
<>


 ;-)

Thanks guys, that's very helpful.  I shall follow your advice

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


[Newbies] How does one decide which Class to use as a model?

2008-08-17 Thread Andy Burnett
The HPI Seaside tutorial shows the data models as subclasses of Object, and
I have seen that elsewhere. However, some examples talk about finding the
closest class to use as your starting point. I am curious what experienced
Squeakers do.

Subclassing Object presumably gives maximum flexibility, but perhaps means
that one ends up building in functionality that already exists further down
the tree. On the other hand, taking a more specific class, might be a bit
like premature optimisation?

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


[Newbies] Is there anything within Seaside that helps to POST data to another website?

2008-08-15 Thread Andy Burnett
I want to build a very simple site (as a learning exercise), that displays a
form, captures that data, modifies it slightly (on the Squeak server) and
then saves it to a totally different web server - just by using a REST
call.

On the face of it, it seems as though I need to use HttpSocket to do the
data saving, but before I start digging into that, I wanted to check whether
there was anything within the Seaside framework that would help me.

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


[Newbies] Why do Seaside's table tags e.g. td etc., live 'outside' of table?

2008-08-12 Thread Andy Burnett
I was looking at some Seaside code today and noticed that it said

html tableCaption: 'blah'.

Rather than

html table tableCaption: 'blah'

In other words, as far as Seaside was concerned the tableCaption tag was
nothing to do with the table tag.  This struck me as slightly odd. Somehow I
would have expected the 'child' tags of table to be created through messages
to the parent table.  However, that clearly isn't the case, and now that I
have looked more closely at the Seaside tag structure, that seems to be the
case for most of the tags.

I am keen to understand what makes good Smalltalk design, so could someone
explain why making the tags independent is a better way of doing it?

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


Re: [Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?

2008-08-06 Thread Andy Burnett
>
>
> Andy> I noticed that the Seaside tutorial has code such as:
> Andy> html div class: 'menu';  with: self menuComponent.
>
> Andy> Whereas the Scriptaculous demo code does things like this:
>
> Andy> html paragraph id: 'position'; with: position.
>
>
> Andy> I.e. they didn't bother adding (or using) a getter for position.  Who
> is
> Andy> right, or doesn't it matter, or is there another reason why it would
> be
> Andy> written differently?
>
> Clearly, position is an instance var, or perhaps a temporary.  An instance
> var
> may or may not have accessors, depending on whether it is meant to be
> tweaked
> from the outside.  #menuComponent, on the other hand, may be just an
> accessor,
> or it may be a whole pile of code to generate that menu on the fly.  At
> this
> point, it doesn't matter.
>
> Whether internal accesses to instance vars should use accessors instead of
> direct access is a subject to debate (read: religious war).  I hope you
> haven't accidentally triggered that thread here.  I tend to do the simplest
> thing that works, and leave it at that.
>

Great, I am all in favour of pragmatism.  Thanks.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Is it generally considered better practice for an object to access its own variables via its getter methods?

2008-08-06 Thread Andy Burnett
I noticed that the Seaside tutorial has code such as:

html div class: 'menu';  with: self menuComponent.

Whereas the Scriptaculous demo code does things like this:

html paragraph id: 'position'; with: position.


I.e. they didn't bother adding (or using) a getter for position.  Who is
right, or doesn't it matter, or is there another reason why it would be
written differently?

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


[Newbies] Can Seaside applications support REST style calls?

2008-08-06 Thread Andy Burnett
I imagine the answer is yes, so the problem should probably be "how can I
get seaside to support rest calls?"

I am thinking of building some components, of a site, in Flash. Ideally, I
would like the user to be able to submit form data through the Flash object.
So, I need to provide some URL handling on the server side. Is there a
object I should use for this?

It is possible that this relates to my other query.  In the Seaside tutorial
image there is Lightbox test.  The Dispatcher doesn't seem to have a
registered RootObject for this entry, and yet it still works. As far as I
can tell, it just calls the SULightBoxTest.  However, I can't work out how
to register an object in that way.

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


[Newbies] What does the -> symbol mean?

2008-07-30 Thread Andy Burnett
>
> < it's the - and > characters put together rather than being a
> specialized glyph like the left arrow was. It creates an Association,
> which is a key-value pair used in things like Dictionaries.
>
> If I remember correctly, any characters which can be used for binary
> methods can be strung together to make other binary methods -
> sometimes you'll see these turn up in specialized contexts. For
> example, there's also ==>, on Booleans, for implication ("a implies b").
>
> Ben Schroeder>>


Thanks Ben, that makes a lot of sense. It's similar to how 1 @ 2 will return
a point.  And, of course, after reading your answer I realised that what I
should have done is used the method finder to look up ->. I just haven't
quite got it into my head that there are only objects and messages, and
therefore if something isn't an object, it has to be a message!   :-)

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


[Newbies] What does the -> symbol mean?

2008-07-29 Thread Andy Burnett
I can't find it in my introductory books. The content was:

self entries add: aString -> aBlock

Is it a bit like the underscore character being the same as :=  ?

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


[Newbies] Morphic, Tweak and Plopp

2008-07-25 Thread Andy Burnett
>> I have just started playing with Plopp (very impressive).  The
>> reason I downloaded it was to see the sort of interfaces that people
>> could build in Squeak.  What I am wondering is whether the UI is
>> built on top of Morphic, or whether it is completely different.
>> Does anyone know?

>The 2D UI is Tweak, the 3D rendering Croquet.

>I'm pretty sure you could do the same kind of UI in Morphic though.
>Just hire great designers ;)

>- Bert -

Ah yes, with a good designer - and enough time - anything is possible :-)

However, you response raises other questions in my mind. In my beginner's
mind, Squeak and Morphic are all wrapped up as one thing. Clearly though,
that isn't the case. So, are there any rules of thumb about when one would
build an application using the Morphic classes and when to use something
else?  Also, what might the 'something elses' be?

For example, it seems as though both Plopp and Sophie use Tweak and Croquet
(if I understand the email thread correctly).  So, does that imply that
Morphic is great of e-toys etc, but not for stand alone applications?

I like being able to play with morphs, but I am trying to build some
applications that are more like Sophie etc.

What do the assembled experts think?  Also, do you think of web browsers
(via Seaside etc) as just another Squeak rendering model, i.e. should that
be added to my list of potential UI libraries, or is it a very different
development process?

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


[Newbies] Does Plopp use Morphic?

2008-07-23 Thread Andy Burnett
I have just started playing with Plopp (very impressive).  The reason I
downloaded it was to see the sort of interfaces that people could build in
Squeak.  What I am wondering is whether the UI is built on top of Morphic,
or whether it is completely different.  Does anyone know?

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


[Newbies] New Smalltalk videos

2008-07-14 Thread Andy Burnett
>

Hi Stef

I am also happy to help with the project, and I do sound quite a lot like
Ricky Gervais ;-)

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


[Newbies] Re: Beginners Digest, Vol 26, Issue 21

2008-06-16 Thread Andy Burnett
Hi Marcus
Thanks for your thoughts.

This whole project is proving slightly trickier than I had anticipated!
However, as the purpose is to work out whether Squeak allows me to prototype
things faster than e.g. Flex, this is all providing useful information.

At the moment I am trying to achiever the coverflow effect by deforming a
polygon morph. I don't know if this will be fast enough, and I like your
suggestion (and Burt's) about trying Croquet - if I can't get this to run at
an acceptable speed.

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


[Newbies] Creating a coverflow effect in Squeak

2008-06-14 Thread Andy Burnett
Thanks Herbert and Bert (and thanks for your e-toy demo).

For me, the really interesting part is learning how to think in Squeak.  I
hadn't really seen this as an animation problem, so I was looking in the
wrong place.

I will got and have a play with your various suggestions, and then come back
when I am stuck again ;-)

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


[Newbies] Creating a coverflow effect in Squeak

2008-06-13 Thread Andy Burnett
I would like to create an image display system similar to the one Apple use
on the Macintosh - where pictures slide into view (not a very good
description, but if you have seen iTunes, you know what I mean).

I had a look in Squeaksource but found nothing similar.  Could anyone give
me some pointers on how to start this project. For example, is there a 'film
strip' morph that already handles lists of images or something similar?

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


[Newbies] Re: Beginners Digest, Vol 22, Issue 9

2008-02-11 Thread Andy Burnett

@Yoshiki (and everyone else)

Thanks very much for the suggestions about using the self halt and  
dragging onto a workspace - that is very helpful.


The E-Toy Outliner is a small example application - not sure if it is  
in all images. Try searching for Outliner in the classes.  I am hoping  
to extend it so that it can save data to a web server etc. It will be  
an interesting test as my knowledge develops.


I found another solution to getting a handle on an object that was  
dragged from a flap. If I inspect the object and then execute  
something like Temp1 := self  (in the inspector bottom pane), I then  
have a handle on it via a global variable. This also led me to learn  
that Smalltalk removeKey: Temp1 - let's me tidy up the dictionary.


Finally, I have started a blog called
http://learningsmalltalk.blogspot.com

The idea is that it will capture my 'hmms' and 'ahhs' as I go through  
the process. I only mention this in case it is of use/interest to  
other beginners.


Cheers
AB


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


[Newbies] Getting a handle on objects which are instantiated through the various flaps

2008-02-08 Thread Andy Burnett
I imagine the answer to this is going to be pretty obvious. However... ;-)

When I pull an object from a flap onto the desktop, how can I get a handle
on it so that I can send it messages programmatically?  What I am hoping is
that I could drag e.g. the bouncing atom thing into a project, and then - in
a workspace? - be able to send it messages.  Or, if this is completely the
wrong approach, how else might I be able to play with an object instantiated
in this way.

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


[Newbies] How do you start to understand a new Squeak 'program'?

2008-02-08 Thread Andy Burnett
As my next step in learning Squeak, I thought I would try to enhance the
EToy Outliner widget. However, as soon as I started to do this I realised
that I didn't really know how to 'grok' the code. So, when the experts in
this list, are faced with a new application, how do you go about
understanding it? Do you draw out object diagrams, open lots of source
browsers, or do other clever things?

The reason I am asking is that, at the moment, I find that I am jumping
around the system browser looking up all sorts of objects/methods etc., in
what feels like a very disorganised way, trying to piece together what
actually happens.  I am sure there must be a better way to tackle this.

Also, I don't really understand how to trace a Squeak application.  I
imagine I could put lots of 'Transcript show:'s into the code, but again, I
feel there must be a better way.  Is it possible to run the code in debug
mode?

Thanks for any advice you guys can offer

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


[Newbies] Understanding "self"

2008-01-30 Thread Andy Burnett
I am working through the SBE book ( which is really very good) and I  
have been experimenting with using self in blocks.


In simple terms I am doing something like:
" within the initialisation of an object"

aVar := AnotherObj new
aVar setBlockTo: [Transcript show: self]

Then I had a method in the first object which asked the second object  
to show the value of its block.


What I was expecting was for self to be defined in terms of the object  
it was assigned to ie the second object. However it actually returns  
tv details of the object the block was coded in


Somehow I don't think I am explaining myself very well. But what I  
want to know is how to think about self. Will it always point to the  
object in which the method was actually written?


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


[Newbies] Traits

2007-09-03 Thread andy . burnett
Thanks Matthew, that's interesting. I have never heard of traits.  So 
'uses:' is a way of incorporating behaviour/values which don't naturally 
inherit?

cheers
AB


This is not a class; it is a trait. Traits are separate from
classes.

Object is not special; neither is it's superclass ProtoObject.
ProtoObject, the root object is just a subclass of nil.

> 2. What does uses: mean?  I haven't seen this in a class definition 
> before.

uses: can be added to any class or trait definition to signify
that this class/trait incorporates some traits into it's
behavior definition. The only senders I know of in a stock image
are ClassDescription and TraitDescription; traits are not used
much yet
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Understanding TEasilyThemed

2007-09-02 Thread andy . burnett
I have now successfully got the new UI themes working - thanks to everyone 
for their advice.

Looking through the code I see quite a few classes which are defined like 
this:

TEasilyThemed classTrait
uses: {}

This raises a few questions for me

1. As there is no subclass message it seems to imply that TEasilyThemed is 
at the same level as Object.  Is that right? because I thought that all 
objects were actually subclasses of Object

2. What does uses: mean?  I haven't seen this in a class definition 
before.

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


[Newbies] Installing .mcz files

2007-08-31 Thread andy . burnett
Hello

I downloaded the new UI files - which all look very exciting - but now I 
am a bit stuck.  How does one load them?  The web site mentioned package 
universe as an option. Can anyone enlighten me?

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


Re: [Newbies] Advice on tracing program logic

2007-04-15 Thread andy . burnett
WOW!  Edgar thanks so much for the info.  That has really helped me out 
:-)

I knew that Squeak was a dynamic system but I hadn't really understood the 
implications, e.g. being able to change things on the fly in this way. I 
think I am going to have a lot of fun.

Cheers
AB



<>
___
Beginners mailing list
[EMAIL PROTECTED]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Advice on tracing program logic

2007-04-14 Thread andy . burnett
Hello

I need a little help working out how to 'trace' a Squeak program.  This is 
the problem which started me off.  I wanted to insatiate a FileList - just 
to play around with it.  I knew I could create one by using the icon in 
the tools flap, but I couldn't work out how to create a new instance which 
was visible. I tried:

tmp1 := FileList open.
tmp1 makeMeVisible

which gave me a debug window.

What I need to understand at the moment is how can I see the code which is 
being called when I click on the File List icon in the tools flap, because 
that is obviously creating an instance in the right way.  I did try 
inspecting the icon but that didn't really give me any clues.

What I am hoping is that if I can understand how an experienced squeaker 
would deal with this very simple case, it will help me understand how to 
learn squeak more generally

Thanks
AB
___
Beginners mailing list
[EMAIL PROTECTED]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Re: Training courses

2007-01-24 Thread andy . burnett
@ Todd - I am based in Cambridge UK

@ everyone else., thank you I will try the videos and I will definitely 
download the Cincom stuff.
___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Thank you for all your training/learning thoughts

2007-01-23 Thread andy . burnett
I think what I really need to do is to get over the initial 'hump' of 
building squeak applications. I need to go beyond the normal 'bank 
account' example so that I can see how to put together something more 
complex.  I will try the books.

What about taking a training course in another dialect e.g Cincom 
Smalltalk.  How transferable would that be?

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


[Newbies] Does anyone offer a squeak training course?

2007-01-23 Thread andy . burnett
I sometimes find it easier to actually go on a training course than trying 
to work through text books.  Does anyone offer such a course?

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


[Newbies] Building Firefox or Gecko into Squeak

2006-12-04 Thread andy . burnett
I think this should probably be filed under "don't' hold your breath"

I find that I am doing more and more of my work in Firefox. And, I would 
love to be able to write apps in smalltalk which take advantage of Gecko's 
rending abilities.

Is anyone working on combining the two?  Or, if not, are there any plans 
to produce a better web browser within Squeak? It doesn't have to be Gecko 
based, it is just that it is a nice engine.

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


[Newbies] Is there a way to watch all the messages flowing in Squeak?

2006-10-18 Thread andy . burnett

Although everything in Squeak is open,
I find it quite hard sometimes to track down what is calling what.  It
would be great if I could open up a window to see which object is being
called when I e.g. right click on the surface and bring up the World menu
etc.

Is there some way to turn on the debugger
and just let it run, or something like that?

thanks
Andy B___
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners


[Newbies] Problems with do:

2006-09-16 Thread andy . burnett
I need someone to poke me with a clue stick please!

I am trying to step through a file a line at a time.  I had the idea that 
this should work

aFileStream nextLine do: [ :line| Transcript show: line; cr.].

Unfortunately (as will be obvious to everyone) what it actually does is 
print a character at a time.  It took me a while to realise that   - 
aFileStream nextLine  - is returning a string and the   -  do:  - passing 
the block to each character.

I need a way of passing the block to the string a line at a time. Or 
perhaps I have got this totally back to front and there is a much easier 
way of doing this?

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


[Newbies] Re: Andy Burnett is out of the office

2006-09-03 Thread andy . burnett
LOL - sorry guys, I should have blocked this list from the out of office 
memo agent

Having said that, when I say that I am on vacation, it doesn't mean I 
won't be playing with Squeak - but that is probably obvious ;-)


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


[Newbies] Andy Burnett is out of the office.

2006-09-02 Thread andy . burnett

I will be out of the office starting  01/09/2006 and will not return until
10/09/2006.


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


[Newbies] How to partition an application

2006-08-25 Thread andy . burnett

I am slowly moving along with my Wget
app - thanks to the help from this list.  

However I now need to understand how
to 'package' my app so that it is most useful to other people.  It
seems as though there are 3 things I could do:

1. Add code to the HttpClient and Httpsocket
(possibly moving some of the instance code to the class side)
2. Subclass the two classes
3. Leave them exactly as they are and
put all the code in my new Wget class.

It seems to me that putting it all into
the Wget object would make it easiest for people to use it, but perhaps
it makes it harder for people to reuse the code elsewhere, i.e. some of
the 'helper' methods might be useful in a number of different situations
- nothing to do with Wget.  Subclassing the other objects seems simple,
but - presumably - if everyone were to share their work this way we would
end up with many many different versions of the basic classes (perhaps
that would be a good thing but it could also be confusing). Finally, changing
the basic objects keeps the class hierarchy clean, but I imagine most people
wouldn't want to have someone else's code messing around with their classes.

So...  what is the best way to
develop Squeak code so that other people can use it?

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


[Newbies] HTTPSocket class - getting to the instance

2006-08-24 Thread andy . burnett

First, Smalltalk is just amazing!  I
am so impressed with what it is possible to do - with practically no knowledge!

Second. Due to my lack of knowledge
I am now stuck ;-)

I am still working on the problem of
building a Smalltalk version of Wget.  I have used the HTTPClient
as my basic object and that is doing most of what I want. However, I can't
get to the HTTP Headers. I noticed that HTTPSocket does seem to offer the
headers but this is where I get stuck.

The creation methods of HTTPSocket  (i.e.
telling it which url to go to) seem to only exist on the class side.  But
the methods for getting to headers etc only exist in the instance.  I
can't work out how to create an instance of the socket and tell it which
url to go to.  All the construction methods just seem to return the
class.  

Obviously I am missing something pretty
basic. Could someone please enlighten me?

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


Re: [Newbies] Building the equivalent of wget in Squeak

2006-08-22 Thread andy . burnett

Brilliant, that is just what I was looking
for. I just hadn't been looking in the right places.

Thanks very much.

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


[Newbies] Re: Beginners Digest, Vol 4, Issue 34

2006-08-21 Thread andy . burnett

Thank you gentlemen

@Damien
 you are quite right, networking may be too difficult to begin with.
It is just that in some languages, e.g. Rebol, fetching http is trivially
simple. I was hoping it might be similar in Smalltalk.

@Stephane.  Thanks, I shall go
and look directly.

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


[Newbies] Building the equivalent of wget in Squeak

2006-08-21 Thread andy . burnett

Hello

I would like to create a simple means
of getting the contents of a web page, in the same way that wget works.
 What I hoped to do was something like:

wget url: 'http://...' show.

I found a few classes e.g. Httpurl and
also the asUrl method of the string class, but I can't quite work out how
to put it all together.  As it seems like a simple way to start learning
Squeak, I wonder if someone could point me in the right direction.

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


[Newbies] creating smooth graphic in squeak

2006-05-30 Thread andy . burnett

I have only just started playing with
squeak and I suspect this is a very very basic question!

The graphics in the squeak environment
-- and by that I mean things like the lines drawn round boxes and even
the little widgets of the closing windows etc -- seemed to be very primitive.
 They seemed to lack the anti alias smoothness which you find in,
for example, flash.  I've tried running squeak on both Windows and
Mac, and the graphics do seem smoother on the Macintosh.  So this
makes me wonder if there is a setting somewhere in the Windows environment
which I have missed.  To put it another way, is there a way to get
squeak to use the native Windows widgets?

Thanks in advance

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