Skip to content

List of deprecations

Herbert Vojčík edited this page Jul 25, 2015 · 19 revisions

0.17 deprecations (scheduled)

List of deprecations that are pending to remove in 0.17 version follows. To see list of deprecations removed in 0.14, scroll down to "0.14 deprecations".

Deprecation that are already removed are checked.

Note: This list is work in progress. Add a deprecation which is still missing in it.

Non-smalltalk deprecations

amber-dev/lib/Test.st

  • Use amber-dev/lib/NodeTestRunner.st/.js instead

cli amberc -m / -M / Program (generating node executable)

  • Use r.js / r.js.cmd or requirejs grunt task (you can start with existing one for the test runner in amber init-generated project).

amberc grunt task main_class / main_file / output_name (generating node executable)

  • Use r.js / r.js.cmd or requirejs grunt task (you can start with existing one for the test runner in amber init-generated project).

Smalltalk deprecations

PlatformInterface ajax: opt, anInterfacingObject ajax: opt

  • Include Wrappers-JQuery package from amber-contrib-jquery bower package and use JQuery current ajax: opt, or use any other AJAX library / HTTP client library of your own choice. You may also change your code to use XMLHttpInterface API and get an instance of one with Platform newXhr.

BrowserInterface class

  • Use Terminal or Platform. This class was never meant to use directly.

PlatformInterface alert: anObject

  • Use Terminal alert: anObject

PlatformInterface confirm: anObject

  • Use Terminal confirm: anObject

PlatformInterface prompt: anObject

  • Use Terminal prompt: anObject

PlatformInterface prompt: anObject default: anotherObject

  • Use Terminal prompt: anObject default: anotherObject

PlatformInterface globals

  • Use Platform globals

PlatformInterface existsGlobal: aString

  • Use Smalltalk existsJsGlobal: aString

0.14 deprecations (nearly all removed)

Non-smalltalk deprecations

loader callback: amber.GlobalFoo

  • Use amber.globals.GlobalFoo.

loader callback: amber.defaultAmdNamespace = "foo"; amber.initialize();

  • Use amber.initialize({"transport.defaultAmdNamespace": "foo"});.

loader callback: amber.smalltalk / amber.vm

  • Use amber.core.

core api: .method({..., category: "foo", ...})

  • Use .method({..., protocol: "foo", ...}).

core api: .selector(...)

  • Use .st2js(...).

core api: .convertSelector(...)

  • Use .js2st(...).

core export: .vm

  • Use .api.

inlinejs: smalltalk / globals / _st

  • Use $core / $globals / $recv.

amd: modules "amber_vm/foo"

  • Use "amber/boot" and use boot.exportedFoo.

amd: mapping "namespace/_source" to point to .st storage

  • Just do not map it and .st is stored to same location as .js. Retained, not recommended.

html: script src="amber_path/support/require.min.js"

  • Include requirejs as project dependency via bower / npm / ... .

Smalltalk deprecations

annoucementSubscription block

  • Use announcementSubscription valuable.

annoucementSubscription block: foo

  • Use announcementSubscription valuable: foo.

aCollection contains: [ :each | ... ]

  • Use aCollection anySatisfy: [ :each | ... ].

aString asSelector

  • Use aString asJavaScriptMethodName

aString asJavascriptSelector

  • Use aString asJavaScriptPropertyName

Smalltalk at: / at:ifAbsent: / at:put:

  • Use Smalltalk globals at: etc.

Smalltalk current

  • Use Smalltalk.

Smalltalk vm

  • Use Smalltalk core.

Smalltalk createPackage: 'Foo' properties: bar

  • Use Smalltalk createPackage: 'Foo'. No way to set properties.

SmalltalkImage current

  • Use Smalltalk. Retained to comply with use of current as singleton instantiator elsewhere.

aMethodContext temps

  • Use aMethodContext locals.

self try: [ code ] catch: [ handler ]

  • Use [code] tryCatch: [ handler ].
Clone this wiki locally