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()); }
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()); }
protected SeriesInfo getSeriesInfo(Catbert.FastStack stack) { return getSeriesInfoObj(stack.pop()); }
protected boolean getBool(Catbert.FastStack stack) { return Catbert.evalBool(stack.pop()); }
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; }
protected CaptureDeviceInput getCapDevInput(Catbert.FastStack stack) { return getCapDevInputObj(stack.pop()); }
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; }
protected ZPseudoComp getUIComp(Catbert.FastStack stack) { Object o = stack.pop(); if (o instanceof ZPseudoComp) return (ZPseudoComp) o; else return null; }
protected Channel getChannel(Catbert.FastStack stack) { return getChannelObj(stack.pop()); }
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; }
protected UserRecord getUserRecord(Catbert.FastStack stack) { Object o = stack.pop(); if (o instanceof UserRecord) return (UserRecord) o; else return null; }
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()); }
protected Airing getAir(Catbert.FastStack stack) { return getAirObj(stack.pop()); }
protected CaptureDevice getCapDev(Catbert.FastStack stack) { return getCapDevObj(stack.pop()); }
protected String[] getStringList(Catbert.FastStack stack) { return getStringListObj(stack.pop()); }
protected Show getShow(Catbert.FastStack stack) { return getShowObj(stack.pop()); }
protected Album getAlbum(Catbert.FastStack stack) { return getAlbumObj(stack.pop()); }
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; }
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()); }
protected MediaFile getMediaFile(Catbert.FastStack stack) { return getMediaFileObj(stack.pop()); }
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(); }