how to get the synchronizationGroup names in SUP 2.2? - ios

Im using SUP2.2 SP06 version. My question is how to get the synchronizationGroup names in iOS ??? I found some methods in generated DB class. Which one I have to use it and how ??

In Win32 code, I find the method GetAllSynchronizationGroups in the generated DB class. There should be something similar in the generated iOS DB class...

Related

Why does DocumentFile.getParentFile() return null after it is created with a Uri?

Code:
DocumentFile dfNew = dfDirectory.createFile("video/mp4", "foo.mp4");
//dfNew.getParentFile() is NOT null.
DocumentFile dfNewCopy = DocumentFile.fromSingleUri(activity, dfNew.getUri());
//dfNewCopy.getParentFile() IS null. Otherwise, dfNewCopy works fine
Why is a DocumentFile created from a DocumentFile's Uri different from the original in this regard?
Storage Access Framework has been designed in days of API 16 for a very narrow use case (implementing the first official Android file picker). DocumentsProvider lacked a lot of useful functionality back then. Many more methods were added in following versions of platform.
The method, required to check whether one Uri is parent of another Uri (isChildDocument) has been added in API 21.
The method for getting parent of Uri (findDocumentPath) has been added in API 26 (Oreo).
DocumentFile can not return the parent Uri on older platforms, because the system itself does not provide it there.

Get mediaId in Umbraco

In Umbraco 7, i am trying to get the Id of a Image on the page. I am using;
#Umbraco.Field("myImage")
But, it does not return the mediaId. Instead it returns;
Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedMediaCache+DictionaryPublishedContent
What am i doing wrong?
There are basically 3 ways:
#CurrentPage.myImage
#Model.Content.GetPropertyValue<int>("myImage")
Using ModelsBuilders you can access it as #Model.myImage
The first method should be avoided because Umbraco will be dropping support for Dynamics (see https://our.umbraco.org/Documentation/Reference/Common-Pitfalls/#dynamics).
ModelsBuilder is my preferred way for accessing published content properties as it provides a strongly typed model based on your Document Type. But it requires some setup. See https://24days.in/umbraco-cms/2016/getting-started-with-modelsbuilder/ for a great intro.
The final option is accessing the properties from #Model.Content (IPublishedContent and unlike the Dyanamics method, will continue to be supported in the next version of Umbraco.
In Umbraco 7 you can use #CurrentPage. You just need to use:
#CurrentPage.myImage
instead of #Umbraco.Field("myImage") and it will return mediaId
I have just upgraded to version 7.6.12 and there are some updates with the media picker. To use it as you done you should select the obsolete mediapicker in the backoffice otherwise Model.Content.GetPropertyValue<IPublishedContent>("myImage").Url should work. If you using the UmbracoHelper, you could write UmbracoHelper.AssignedContentItem.GetPropertyValue<IPublishedContent>(propertyName, recursive).Url
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/

Entity Framework Code First - How do I tell my app to NOW use the production database once development is complete instead of creating a local db?

I'm using Code First with Entity Framework 5 using MVC4 and MVC Scaffolding (link/tutorial: http://www.codeproject.com/Articles/468777/Code-First-with-Entity-Framework-5-using-MVC4-and?msg=4531106#xx4531106xx) to create my database from my models. So, basically, when I run the app, the app drops and creates a new database if my model changes. That's great. Now, obviously, this is great for local development.
But what about when my app goes to production? How do I tell the code to NOT do this anymore, and rather point my app to use the database I have hosted on GoDaddy? I changed the connection string in the web.config to point to that of the GoDaddy database, but this isn't working. What happens is the code still tries to use the old connection string for some reason unknown to me. I can't seem to get my app to NOW use the database I created on GoDaddy. I'm starting to regret going down the code-first route....
Here's the line of code in my Application_Start method that auto-generates my database (in this case, only if my model changes):
System.Data.Entity.Database.SetInitializer(new System.Data.Entity.DropCreateDatabaseIfModelChanges<CapWorx.QuikCap.Models.CapWorxQuikCapContext>());
I found the solution to my problem.
Originally, I had the following in my context's constructor:
static CapWorxQuikCapContext()
{
Database.SetInitializer(new CodeFirstSeeder.Xml.DropCreateDatabaseAlways<CapWorxQuikCapContext>());
}
Note that the CodeFirstSeeder is irrelevant at this point- it's just a strategy I installed to seed some sample data. Anyways, I changed the above to be:
public CapWorxQuikCapContext()
: base("DefaultConnection")
{
}
This tells my app to look at the connection string called "DefaultConnection" and use it for its data source.
(as per our discussion / comments)
simple rule is -
If you have the 'non-static ctor' CapWorxQuikCapContext() : base("connection") - then you have to use that same name in the config as well.
Otherwise - you have to name the connection string the same as your Context class - i.e. exactly the CapWorxQuikCapContext.
If you don't - EF/CF makes its own 'connection' path - i.e. making some default db name - like your context - or like you have in the ctor

smart gwt save list as attribute

Hello i am new in smart gwt and now we are migrate from smartgwt 2.1 to smart gwt 3.1p
and i have got problem :
java.lang.UnsupportedOperationException: Can not convert element 0 of
the array to a JavaScriptObject. Instances of class
`com.test.ListDTO'
can not automatically be converted. Please see the SmartClient
documentation of RPCRequest.data for a table of Java types that can be
converted automatically.
someone write :
treeNode.setAttribute(TODO, listDTO.getLis());
how i can fix that code ?
The setAttribute method of the TreeNode tries to convert the list elements internally. That fails with your own domain objects. You can try to set the list with this helper method:
com.smartgwt.client.util.JSOHelper.setObjectAttribute(treeNode.getJsObj(), TODO, listDTO.getLis());
Now the Java object is set on the JavaScriptObject. To get this object back you can call:
treeNode.getAttributeAsObject(TODO);

Mygeneration autonumber field bug with MS Access database

I am using Mygeneration tools to create the abstract classes responsible for dealing with database to perform CRUD operation as well as some other dooDad operations. Problem is I cant retrieve the auto number field (it is also Primary Key) of table using the code
Employees newObj = new Employees();
newObj.ConnectionString = connectionString;
newObj.AddNew();
// Your Properties will be different here
newObj.FirstName = "Joe";
newObj.LastName = "Plank Plank";
newObj.Save();
int staffid=newObj.StaffID;
The same thing is working fine in MS SQL server or other databases. Looks like auto number is not generated instantly which can be accessed once I added the entry. But, later, when I am checking the database, I found that auto number is generated there. Not sure, why this is happening. Anybody having expertise with dooDads, please help with info.
Edited:
The main problem is I cant access the autonumber field instantly after I create the fresh row entry. Looks like MS Access autonumber takes some time to show up and even in VS, you can see this phenomenon. How to fix this problem?
I have built many applications using Doodads , using MS Access , you have only to make the filed as autonumber .. and generate the stored procedures and other classes.
i.e your code should work ..
also I made modification to Dodads to return list of Objects
How to get list of objects from BusinessEntity using myGeneration?

Resources