Is it necessary to set rbl_viewController when using Rebel's RBLViewController? - objective-c

As the title states, I've been wiring up the rbl_viewController outlet in my XIBs, however on a closer read of the RBLViewController API, this property does seem to get set automatically.
Is it necessary to set rbl_viewController when using Rebel's RBLViewController?

Looks like you don't! rbl_viewController is assigned within RBLViewController's -setView: method.

Related

How to pass the scopes I need in the microsoftTeams.authentication.authenticate() method

After creating a teams-tab-app using the vscode teams toolkit, I see that in the default auth-start.html file the script tries to extract the scopes from the URL (that was constructed by the microsoftTeams.authentication.authenticate() method), however I don't see any reference in the documentation on how to pass these scopes in this method.
Does anyone know how to pass these scopes?
I've wondered about this myself when looking at a toolkit, but I haven't used it for any production systems so never bothered to look too deep. I do see that in useTeamsFx.tsx is where it's doing the redirect to startLoginPageUrl, so presumably you need to set REACT_APP_START_LOGIN_PAGE_URL to be the path to the auth-start.html, so you could set it to include a querystring as well. It needs the app Id so you'd need to set that as well, but the useTeamsFx also wants REACT_APP_CLIENT_ID which you'd set as well. As a result, it might make sense to store the scopes you want in your code or in an environment variable as well, and then compose the value you send to initiateLoginEndpoint. Basically, instead of
var startLoginPageUrl = process.env.REACT_APP_START_LOGIN_PAGE_URL;
...
initiateLoginEndpoint: startLoginPageUrl
...
you might instead make it
var startLoginPageUrl = process.env.REACT_APP_START_LOGIN_PAGE_URL;
var scopes = process.env.REACT_APP_SCOPES; // <-- this is added
...
initiateLoginEndpoint: `${startLoginPageUrl}?clientId=${clientId}&scope=${scopes}`
...
but this is untested, so no guarantees.
On a separate but related note, in my sample project, in auth-start, it refers to a very old version of MicrosoftTeams.min.js (v 1.6, and current is 1.11). I might just have a very old Teams Toolkit, but maybe not...

Why Ext.getCmp is a bad practice? Can be replaced with itemId in all scenarios?

I´ve been using ExtJS for a while and always used "Ext.getCmp" when instanciating components, but most of the time I read that it´s a bad practice and that "itemId" should be used instead, so I´d like to know why is "itemId" better than "Ext.getCmp" and if can be used always.
Additionally I´ve encounter examples where i´m not able (or don´t know how) to use "itemId".
Example:
I can set the disabled property of a button with "Ext.getCmp":
Ext.getCmp('btnMyButton').setDisabled(true);
But with "itemId" I get error: "object reference not set to an instance of an object"
btnMyButton.setDisabled(true);
You have to get button element by item id then call the setDisabled.
Ext.ComponentQuery.query('#btnMyButton').setDisabled(true);
You can refer below link to understand more on id vs itemId
https://vimeo.com/14816550

SmartGWT set Record[] data to a StaticTextItem

I have a StaticTextItem myItem and I would like to set a List of selected in a ListGrid myListGrid items as its value. myListGrid's data is being set via setData(Record[])
For my purpose, I know I can do myItem.setValueField(xxx) but I also need to do a myItem.setOptionDataSource(DataSource). I think I should set the same data as in myListGrid, but I don't know how to convert it from type Record[] into a DataSource object, so that I can use it.
Can you, please, help?
Thanks!
You need I think to:
Instantiate a DataSource
Create its fields with new DataSourceField to get the same data structure as your ListGrid
And add the fields created by invoking setFields() method
Set the data origin of your DataSource by invoking setTestData() method
Hope it could help

SetProperty and property in Jmeter

I need to pass Some variable values from one ThreadGroup to another,
For this I am using
${__setProperty(USERNAME, ${USERNAME})}
to set username in ThreadGroup1 (I tried to set this value in User defined variable as well as bean assertion) and use
${__property(USERNAME)}
to fetch this value in ThreadGroup1
but it doesn't work.I set other variables/ properties in same way but they also doesn't seem fetched in ThreadGroup2.
what do I do wrong?
JMeter Plugins has Inter-Thread Communication see http://code.google.com/p/jmeter-plugins/wiki/InterThreadCommunication for this purpose.
There are 2 methods to use it:
PostProcessor/PreProcessor
Functions __fifoPut and __fifoPop
PostProcessor/PreProcessor is easier to use.

Displaying Custom Attributes in Documentum - Webtop

I am following an article that explains how to use the ICustomAttributeDataHandler class.
I am creating a custom column for the inbox screen, but the problem is that the value I set for my custom attribute is not being reflected on the screen.
As a test I am changing the task name to "whoKnows". But this code is not effecting what is output on the screen:
ICustomAttributeRecordSet.setCustomAttributeValue(i, "taskName", "whoKnows");
(I am able to print debug lines from my custom class when the inbox is viewed, so I know my code is being run.)
Someone on the comments of that article wrote:
the user must call the
"setCustomAttributesInQuery() method
on the dataprovider passing in a
string array of the custom attributes
...what does that meen? Could this be my problem?
thanks.
To be honest, I have already used Webtop, but just as an user. I found a post in the dm developer discussion group that can be useful, though:
For creating a custom column in the
doclist you dont need to go through
this complex procedures. You can use
custom attribute datahandlers for
this.
First in your object list component xml file add your custom column
definition in the "columns" tag. You
can even add static columns instead of
the documentum attributes.
Now create a class which implements the ICustomAttributeDataHandler.
Implement the default the methods getRequiredAttributes and the getData
function.
In getRequiredAttributes add attributes of the object that you are
looking for.
In your getdata method retrieve each row and then based on the
attribute that you see, just set the
value that you want to. 6) Finally
define your class in the app.xml file
There is a section in WDK developement
guide regarding
ICustomAttribuetDataHandlers. Look for
the topic named "Adding custom
attributes to a datagrid".
I'm not sure if this is the final solution, but I hope it helps!
To answer you question about setCustomAttributesInQuery()
every datagrid in WDK is backed by an underlying data provider. You can get this proivder by using the following code.
Datagrid datagrid = (Datagrid)getControl("doclist_grid",com.documentum.web.form.control.databound.Datagrid.class);
DataProvider dp = datagrid.getDataProvider();
Once you've done that, you can call
dp.setCustomAttributesInQuery(myArr);
I'm not actually sure if this is part of the solution to your problem, but you could try this and see where it gets you.
You have to configure the inbox component.
if using classic view, go to inboxlist component and add your custom attribute.
<column>
<attribute>CustomAttributeName</attribute>
<label>Custom Attribute Label</label>
<visible>true</visible>
</column>
Your custom attribute has to be in a custom type that is a sub type of dmi_queue_item, because inboxlist shows only dmi_queue_item objects.
Hope this helps,
Regards,
Tejas.
This may be a non-issue, but based on your code, I can't tell if you're doing this:
ICustomAttributeRecordSet.setCustomAttributeValue(i, "taskName", "whoKnows");
or this:
ICustomAttributeRecordSet rs;
rs.setCustomAttributeValue(i, "taskName", "whoKnows");
You should be calling the setCustomAttributeValue method on the rs object instance, not on the interface.