Changeset 3466
- Timestamp:
- 12/17/06 02:00:08 (2 years ago)
- Files:
-
- trunk/Plug-Ins/JavaScript Support/plugin.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Plug-Ins/JavaScript Support/plugin.html
r3464 r3466 148 148 } 149 149 150 function NSImage( filePath) {150 function NSImage(url) { 151 151 var obj = Plugin.allocInstance('NSImage'); 152 if( filePath !== undefined ) 153 return obj.initByReferencingFile(filePath.toString()); 154 throw "Can't create a NSImage without a file path."; 152 if( url !== undefined ) 153 return obj.initByReferencingURL(url); 154 throw "Can't create a NSImage without a NSURL."; 155 } 156 157 function NSURL(url) { 158 var obj = Plugin.allocInstance('NSURL'); 159 if( url !== undefined ) 160 return obj.initWithString(url.toString()); 161 throw "Can't create a NSURL without a URL string."; 155 162 } 156 163
