mrcarlberg / objj-runtime Goto Github PK
View Code? Open in Web Editor NEWRuntime for Objective-J language
License: MIT License
Runtime for Objective-J language
License: MIT License
Hello :)
Honestly, I had no real good idea for a name for this issue... So, I will let code talk for me instead:
[email protected] ~/W/T/objj $ objj test.j
../test.j:14
(Speaker.isa.method_msgSend["speak"] || _objj_forward)(Speaker, "speak");
^
TypeError: Cannot read property 'speak' of undefined
at main (../test.j:14:32)
at Object.exports.run (/usr/local/lib/node_modules/objj-runtime/lib/objective-j.js:4389:21)
at Object.<anonymous> (/usr/local/lib/node_modules/objj-runtime/bin/objj:3:31)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at internal/main/run_main_module.js:21:11
[email protected] ~/W/T/objj $ objjc ./test.j --ecma5 -o test.js
[email protected] ~/W/T/objj $ cat test.js
{var the_class = objj_allocateClassPair(Nil, "Speaker"),
meta_class = the_class.isa;objj_registerClassPair(the_class);
class_addMethods(meta_class, [new objj_method(sel_getUid("speak"), function $Speaker__speak(self, _cmd)
{
console.log("Hello!");
}
,["id"])]);
}
function main(args, namedArgs)
{
(Speaker.isa.method_msgSend["speak"] || _objj_forward)(Speaker, "speak");
}
[email protected] ~/W/T/objj $ cat test.j
@implementation Speaker {}
+(id) speak {
console.log("Hello!");
}
@end
function main(args, namedArgs) {
[Speaker speak];
}
Why is Speaker
not being defined as a variable?
Thanks in advance!
Kind regards,
Ingwie
The node branch depends on xmldom version >- 0.7.5
This is outdated and all versions earlier than 0.7.7 are flagged during npm update as creating a critical security risk.
Latest version is is 0.8.6.
Note: this is for the published Objective-J runtime npm package rather than Cappuccino itself.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.