Questions tagged [amber-smalltalk]

Amber is a Smalltalk implementation for JavaScript, in JavaScript, designed to integrate with JavaScript.

Amber is a Smalltalk implementation for JavaScript, in JavaScript, designed to integrate with JavaScript.

See http://amber-lang.net/

A tool called amber-cli provides both a REPL and a web server. That server provides the IDE to be used on a web client. Code added in the browser is saved on the server in firm of AMD modules.

In deployment mode compiled amber-smalltalk files may be used like any other AMD JavaScript library.

24 questions
25
votes
2 answers

What is the difference between self and yourself in Smalltalk?

In Smalltalk, there are two terms often found within a method body: self and yourself. What is the difference between them?
Euan M
  • 1,126
  • 11
  • 20
9
votes
4 answers

Amber Smalltalk - Creating a single .js file for deployment

I've seen this topic come up a couple times, but I don't think I've seen any definitive solution posted. I've tried the route of combining all my Foo.deploy.js, Bar.deploy.js into a single .js file, and then including that in the loadAmber() call.…
JohnnyT
  • 207
  • 1
  • 3
6
votes
2 answers

GNU Smalltalk 80 Debugger. How to debug smallcode code ? Start Debugger?

In GNU Smalltalk 80 it is possible to write smalltalk code in your own plain text editor of personal choice. Therefore, it is very important to debug the code. First you save the file as txt File. Then you open the file from the programmers text…
Zabo
  • 273
  • 1
  • 2
  • 8
6
votes
1 answer

Amber and localstorage, asJSON?

I want to store with Amber (on-line IDE) an OrderedCollection in the localStorage of a web browser and later retrieve it. Creating a test data object | coll hcoll | coll := OrderedCollection new. coll add: 'abc'. coll add: 'xon'. hcoll :=…
z--
  • 2,186
  • 17
  • 33
5
votes
2 answers

What is the difference between a collection of associations and a dictionary in Smalltalk?

| dict | dict := #{'foo'->'brown'. 'bar'->'yellow'. 'qix'->'white'. 'baz'->'red'. 'flub'->'green'} asDictionary. dict at: 'qix' If I PrintIt, I get 'white'. If I remove 'asDictionary', I still get 'white'. What does a dictionary give me…
Richard Eng
  • 1,954
  • 6
  • 23
  • 32
5
votes
2 answers

Passing options to JS function with Amber

I'm trying to write the equivalent of: $( "#draggable" ).draggable({ axis: "y" }); in Amber smalltalk. My guess was: '#draggable' asJQuery draggable: {'axis' -> 'y'} but that's not it.
milan
  • 2,355
  • 2
  • 23
  • 38
4
votes
2 answers

Workflow for Cypress, Pharo and Amber

I have a new Pharo 1.4 image setup and want to start playing around with Cypress and exporting packages to git / GitHub. What's the best way to get started with that? FileTree?
JohnnyT
  • 207
  • 1
  • 3
3
votes
2 answers

How do I control which port is used for the Amber Smalltalk node.js server?

Occasionally I need to run two node servers on two different Amber Smalltalk checkouts and it would be real convenient to be able to control this via the startup script, but my read of the startup script tells me that I'll have to edit some code,…
Dale Henrichs
  • 1,293
  • 9
  • 16
3
votes
1 answer

How do I translate JavaScript constructors to Amber Smalltalk?

I use the paperjs graphical objects library with Amber Smalltalk. I want to translate the following Javascript constructors for a Point object to Amber Smalltalk paper.Point(x,…
z--
  • 2,186
  • 17
  • 33
3
votes
1 answer

Getting current timezone

How would I get the current timezone in either Pharo or Amber Smalltalk? (I’m also curious about how I would go about finding this information myself through inspecting the image somehow or however it’s typically done – huge Smalltalk newbie here.)
Edward Ocampo-Gooding
  • 2,782
  • 1
  • 23
  • 29
2
votes
2 answers

How do I get the values of all the fields of a form?

I have a HTML form like this in a client side Amber solution
Creator:
Title:
Description:
Kwaku
  • 276
  • 2
  • 15
2
votes
1 answer

Amber loading with script errors

I was taking a look at amber, and was following the procedure as given here https://github.com/amber-smalltalk/amber/wiki/Getting-started. But when i run amber using bin\amber serve , i get a blank page and it has some unloaded scripts , which…
Thushar G R
  • 1,017
  • 9
  • 24
2
votes
1 answer

Amber Smalltalk JavaScript Output

I'm evaluating switching my Web App work to Amber Smalltalk and away from CoffeeScript. I like CS fine but I'm far more comfortable with Smalltalk. I have had a lot of trouble finding sites that are deployed from Amber so that I can evaluate the…
Dan Shafer
  • 61
  • 1
  • 6
2
votes
1 answer

How to permit access to a different port?

The Amber Smalltalk IDE works with a server written in nodejs. How can I configure the server that XMLHttpRequests going to a different port of the same domain are allowed? The default access to Amber is http://127.0.0.1:4000/ And to retrieve and…
z--
  • 2,186
  • 17
  • 33
2
votes
1 answer

Amber Smalltalk and XMLHttpRequest (GET)

I try to print | req | req := XMLHttpRequest new. req open: 'GET' url: 'http://www.stackoverflow.com/' asynchronous: false. req send: ''. req responseText The debugger tells me [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)"…
z--
  • 2,186
  • 17
  • 33
1
2