protected Widget getWidget(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof Widget) return (Widget) o;
   else if (o != null && stack.getUIMgr() != null) {
     // Try to lookup the widget by symbol
     return (Widget) (stack.getUIMgr().getModuleGroup().symbolMap.get(o.toString()));
   } else return null;
 }
 protected long getLong(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return 0;
   else if (o instanceof Number) return ((Number) o).longValue();
   else if (o instanceof java.util.Date) return ((java.util.Date) o).getTime();
   else return Long.parseLong(o.toString());
 }
 protected int getMediaMask(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return 0;
   else {
     return DBObject.getMediaMaskFromString(o.toString());
   }
 }
 protected TVEditorial getEditorial(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.vfs.MediaNode) o = ((sage.vfs.MediaNode) o).getDataObject();
   if (o instanceof TVEditorial) return (TVEditorial) o;
   else if (o instanceof Show) return Wizard.getInstance().getEditorial((Show) o);
   else return null;
 }
 protected Object makeNetworkedCall(Catbert.FastStack stack) throws sage.jep.ParseException {
   Object[] args = new Object[curNumberOfParameters];
   for (int i = args.length - 1; i >= 0; i--) args[i] = stack.pop();
   SageTVConnection sn = NetworkClient.getSN();
   if (sn != null) return sn.requestAction(methodName, args);
   else return null;
 }
 public final void run(Catbert.FastStack stack) throws sage.jep.ParseException {
   if (networked && Sage.client) {
     Object[] args = new Object[curNumberOfParameters];
     for (int i = args.length - 1; i >= 0; i--) args[i] = stack.pop();
     SageTVConnection sn = NetworkClient.getSN();
     if (sn != null) stack.push(sn.requestAction(methodName, args));
     else stack.push(null); // to keep the stack pointer correct
   } else {
     if (API_PROFILING) numCalls++;
     try {
       stack.push(runSafely(stack));
     } catch (sage.jep.ParseException pe) {
       throw pe;
     } catch (Exception e) {
       e.printStackTrace();
       throw new sage.jep.ParseException(
           "Error in method reflection of " + methodName + " of " + e, e);
     }
   }
 }
 protected java.io.File getFile(Catbert.FastStack stack) {
   return getFileObj(stack.pop());
 }
 protected java.util.regex.Pattern getRegex(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return null;
   else if (o instanceof java.util.regex.Pattern) return (java.util.regex.Pattern) o;
   else return java.util.regex.Pattern.compile(o.toString());
 }
 protected static Person getPerson(Catbert.FastStack stack) {
   return getPersonObj(stack.pop());
 }
Esempio n. 10
0
 protected float getFloat(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return 0;
   else if (o instanceof Number) return ((Number) o).floatValue();
   else return Float.parseFloat(o.toString());
 }
Esempio n. 11
0
 protected SeriesInfo getSeriesInfo(Catbert.FastStack stack) {
   return getSeriesInfoObj(stack.pop());
 }
Esempio n. 12
0
 protected boolean getBool(Catbert.FastStack stack) {
   return Catbert.evalBool(stack.pop());
 }
Esempio n. 13
0
 protected Playlist getPlaylist(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.vfs.MediaNode) o = ((sage.vfs.MediaNode) o).getDataObject();
   if (o instanceof Playlist) return (Playlist) o;
   else return null;
 }
Esempio n. 14
0
 protected CaptureDeviceInput getCapDevInput(Catbert.FastStack stack) {
   return getCapDevInputObj(stack.pop());
 }
Esempio n. 15
0
 protected sage.plugin.PluginWrapper getPlugin(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.plugin.PluginWrapper) return (sage.plugin.PluginWrapper) o;
   else return null;
 }
Esempio n. 16
0
 protected ZPseudoComp getUIComp(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof ZPseudoComp) return (ZPseudoComp) o;
   else return null;
 }
Esempio n. 17
0
 protected Channel getChannel(Catbert.FastStack stack) {
   return getChannelObj(stack.pop());
 }
Esempio n. 18
0
 protected sage.vfs.MediaNode getMediaNode(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.vfs.MediaNode) return (sage.vfs.MediaNode) o;
   else return null;
 }
Esempio n. 19
0
 protected UserRecord getUserRecord(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof UserRecord) return (UserRecord) o;
   else return null;
 }
Esempio n. 20
0
 protected java.awt.Color getColor(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return null;
   else if (o instanceof java.awt.Color) return (java.awt.Color) o;
   else return java.awt.Color.decode(o.toString());
 }
Esempio n. 21
0
 protected Airing getAir(Catbert.FastStack stack) {
   return getAirObj(stack.pop());
 }
Esempio n. 22
0
 protected CaptureDevice getCapDev(Catbert.FastStack stack) {
   return getCapDevObj(stack.pop());
 }
Esempio n. 23
0
 protected String[] getStringList(Catbert.FastStack stack) {
   return getStringListObj(stack.pop());
 }
Esempio n. 24
0
 protected Show getShow(Catbert.FastStack stack) {
   return getShowObj(stack.pop());
 }
Esempio n. 25
0
 protected Album getAlbum(Catbert.FastStack stack) {
   return getAlbumObj(stack.pop());
 }
Esempio n. 26
0
 protected sage.msg.SystemMessage getSysMsg(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.vfs.MediaNode) o = ((sage.vfs.MediaNode) o).getDataObject();
   if (o instanceof sage.msg.SystemMessage) return (sage.msg.SystemMessage) o;
   else return null;
 }
Esempio n. 27
0
 protected int getInt(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o == null) return 0;
   else if (o instanceof Number) return ((Number) o).intValue();
   else return Integer.parseInt(o.toString());
 }
Esempio n. 28
0
 protected MediaFile getMediaFile(Catbert.FastStack stack) {
   return getMediaFileObj(stack.pop());
 }
Esempio n. 29
0
 protected static String getString(Catbert.FastStack stack) {
   Object o = stack.pop();
   if (o instanceof sage.vfs.MediaNode) o = ((sage.vfs.MediaNode) o).getPrimaryLabel();
   if (o == null) return null;
   else return o.toString();
 }